本文整理匯總了Java中net.sf.jasperreports.extensions.SingletonExtensionRegistry類的典型用法代碼示例。如果您正苦於以下問題:Java SingletonExtensionRegistry類的具體用法?Java SingletonExtensionRegistry怎麽用?Java SingletonExtensionRegistry使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
SingletonExtensionRegistry類屬於net.sf.jasperreports.extensions包,在下文中一共展示了SingletonExtensionRegistry類的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: createRegistry
import net.sf.jasperreports.extensions.SingletonExtensionRegistry; //導入依賴的package包/類
@Override
public ExtensionsRegistry createRegistry(String registryId, JRPropertiesMap properties)
{
String template = properties.getProperty(EXTENSION_PROPERTY_TEMPLATE_PREFIX + registryId);
String enabledProp = properties.getProperty(EXTENSION_PROPERTY_ENABLED_PREFIX + registryId);
boolean enabled = JRPropertiesUtil.asBoolean(enabledProp, true);
if (log.isDebugEnabled())
{
log.debug("creating requirejs template contributor " + registryId
+ ", template: " + template + ", enabled: " + enabled);
}
RequirejsTemplateConfigContributor templateContributor = new RequirejsTemplateConfigContributor();
templateContributor.setTemplateName(template);
setPaths(registryId, properties, templateContributor);
setResources(registryId, properties, templateContributor);
RequirejsConfigContributorSwitchDecorator switchDecorator = new RequirejsConfigContributorSwitchDecorator();
switchDecorator.setDefaultEnabled(enabled);
switchDecorator.setPropertyName(PROPERTY_ENABLED_PREFIX + registryId);
switchDecorator.setContributor(templateContributor);
ExtensionsRegistry registry = new SingletonExtensionRegistry<RequirejsConfigContributor>(
RequirejsConfigContributor.class, switchDecorator);
return registry;
}
示例2: createRegistry
import net.sf.jasperreports.extensions.SingletonExtensionRegistry; //導入依賴的package包/類
@Override
public ExtensionsRegistry createRegistry(String registryId, JRPropertiesMap properties)
{
String root = JRPropertiesUtil.getInstance(DefaultJasperReportsContext.getInstance()).getProperty(properties, PROPERTY_FILE_REPOSITORY_ROOT);
boolean resolveAbsolutePath = JRPropertiesUtil.getInstance(DefaultJasperReportsContext.getInstance()).getBooleanProperty(properties, PROPERTY_FILE_REPOSITORY_RESOLVE_ABSOLUTE_PATH, false);
return new SingletonExtensionRegistry<RepositoryService>(RepositoryService.class, new FileRepositoryService(DefaultJasperReportsContext.getInstance(), root, resolveAbsolutePath));
}
開發者ID:TIBCOSoftware,項目名稱:jasperreports,代碼行數:9,代碼來源:FileRepositoryServiceExtensionsRegistryFactory.java
示例3: createRegistry
import net.sf.jasperreports.extensions.SingletonExtensionRegistry; //導入依賴的package包/類
@Override
public ExtensionsRegistry createRegistry(String registryId, JRPropertiesMap properties)
{
List<PropertySuffix> categoryProperties = JRPropertiesUtil.getProperties(properties, IDENTITY_SECTRETS_PROVIDER_CATEGORY_PROPERTY_PREFIX);
Set<String> categories = new HashSet<String>();
for (Iterator<PropertySuffix> it = categoryProperties.iterator(); it.hasNext();) {
PropertySuffix categoryProp = it.next();
categories.add(categoryProp.getValue());
}
return new SingletonExtensionRegistry<SecretsProviderFactory>(SecretsProviderFactory.class, new IdentitySecretsProviderFactory(categories));
}
開發者ID:TIBCOSoftware,項目名稱:jasperreports,代碼行數:13,代碼來源:IdentitySecretsProviderExtensionsRegistryFactory.java
示例4: createRegistry
import net.sf.jasperreports.extensions.SingletonExtensionRegistry; //導入依賴的package包/類
@Override
public ExtensionsRegistry createRegistry(String registryId, JRPropertiesMap properties)
{
List<String> classNames = new ArrayList<String>();
addFunctionClasses(classNames, properties, EXPRESSION_FUNCTIONS_CLASSES_PROPERTY_PREFIX);
addFunctionClasses(classNames, properties, FUNCTIONS_CLASSES_PROPERTY_PREFIX);
return new SingletonExtensionRegistry<FunctionsBundle>(FunctionsBundle.class, new FunctionsBundle(classNames));
}