use of com.sun.enterprise.util.LocalStringManagerImpl in project Payara by payara.
the class GenericListCommand method postConstruct.
@Override
public void postConstruct() {
super.postConstruct();
listing = targetMethod.getAnnotation(Listing.class);
resolverType = listing.resolver();
try {
// we pass false for "useAnnotations" as the @Param declarations on
// the target type are not used for the List method parameters.
cmdModel = new GenericCommandModel(targetType, false, null, listing.i18n(), new LocalStringManagerImpl(targetType), habitat.<DomDocument>getService(DomDocument.class), commandName, false, listing.resolver(), GenericListCommand.class);
targetModel = habitat.<DomDocument>getService(DomDocument.class).buildModel(targetType);
if (logger.isLoggable(level)) {
for (String paramName : cmdModel.getParametersNames()) {
CommandModel.ParamModel param = cmdModel.getModelFor(paramName);
logger.log(Level.FINE, "I take {0} parameters", param.getName());
}
}
} catch (Exception e) {
String msg = localStrings.getLocalString(GenericCrudCommand.class, "GenericCreateCommand.command_model_exception", "Exception while creating the command model for the generic command {0} : {1}", commandName, e.getMessage());
LogHelper.log(logger, Level.SEVERE, ConfigApiLoggerInfo.GENERIC_CREATE_CMD_FAILED, e, commandName);
throw new RuntimeException(msg, e);
}
}
Aggregations