[Title] Fix Activationg bug
authorBonyong.lee <bonyong.lee@samsung.com>
Wed, 4 Jul 2012 06:00:44 +0000 (07:00 +0100)
committerBonyong.lee <bonyong.lee@samsung.com>
Wed, 4 Jul 2012 06:00:44 +0000 (07:00 +0100)
[Type]      Bugfix
[Module]    Sub
[Priority]  Minor
[CQ#]
[Redmine#]
[Problem]
[Cause]
[Solution]
[TestCase]

org.tizen.common/src/org/tizen/common/core/command/PolicyRegistryFactory.java
org.tizen.common/src/org/tizen/common/core/command/policy/MessagePolicy.java

index d679de4..29fc648 100644 (file)
@@ -28,7 +28,6 @@ import static org.tizen.common.core.command.Policy.EXIST_OUT_FILE;
 import static org.tizen.common.core.command.Policy.NONEXIST_IN_FILE;
 
 import org.tizen.common.Factory;
-import org.tizen.common.core.command.Policy;
 import org.tizen.common.core.command.policy.AbstractPolicy;
 import org.tizen.common.core.command.policy.FilePolicy;
 import org.tizen.common.core.command.policy.MessagePolicy;
index 0e9be14..379c601 100644 (file)
@@ -39,7 +39,7 @@ public interface
 MessagePolicy
 {
        /**
-        * Print out <code>message</code>
+        * Print out message
         * 
         * @param prompter {@link Prompter}
         * @param format message format
@@ -53,6 +53,19 @@ MessagePolicy
        );
        
        /**
+        * Print out error message
+        * @param prompter {@link Prompter}
+        * @param format message format
+        * @param args message arguments
+        */
+       void
+       error(
+               final Prompter prompter,
+               final String format,
+               final Object... args
+       );
+       
+       /**
         * {@link MessagePolicy} to print out using logger
         * 
         * FIXME caller fqcn is constants
@@ -73,11 +86,24 @@ MessagePolicy
                void
                print(
                        final Prompter prompter,
-                       final String message,
+                       final String format,
                        final Object... args
                )
                {
-                       logger.debug( format( message, args ) );
+                       logger.debug( format( format, args ) );
+               }
+
+               /* (non-Javadoc)
+                * @see org.tizen.common.core.command.policy.MessagePolicy#error(org.tizen.common.core.command.Prompter, java.lang.String, java.lang.Object[])
+                */
+               @Override
+               public void error(
+                       final Prompter prompter,
+                       final String format,
+                       final Object... args
+               )
+               {
+                       logger.error( format( format, args ) );
                }
        };
        
@@ -95,11 +121,25 @@ MessagePolicy
                void
                print(
                        final Prompter prompter,
-                       final String message,
+                       final String format,
+                       final Object... args
+               )
+               {
+                       prompter.notify( format( format, args ) );
+               }
+
+               /* (non-Javadoc)
+                * @see org.tizen.common.core.command.policy.MessagePolicy#error(org.tizen.common.core.command.Prompter, java.lang.String, java.lang.Object[])
+                */
+               @Override
+               public void error(
+                       final Prompter prompter,
+                       final String format,
                        final Object... args
                )
                {
-                       prompter.notify( format( message, args ) );
+                       prompter.error( format( format, args ) );
+                       
                }
        };