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;
MessagePolicy
{
/**
- * Print out <code>message</code>
+ * Print out message
*
* @param prompter {@link Prompter}
* @param format message format
);
/**
+ * 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
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 ) );
}
};
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 ) );
+
}
};