本文整理了Java中org.milyn.container.ApplicationContext.getProfileStore()
方法的一些代码示例,展示了ApplicationContext.getProfileStore()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ApplicationContext.getProfileStore()
方法的具体详情如下:
包路径:org.milyn.container.ApplicationContext
类名称:ApplicationContext
方法名:getProfileStore
[英]Get the ProfileStore in use within this Context.
[中]获取在此上下文中使用的ProfileStore。
代码示例来源:origin: org.virtuslab/milyn-smooks-core
private void addProfileSets(List<ProfileSet> profileSets) {
if(profileSets == null) {
return;
}
// TODO Sort out the other app context impls such that we can get the profile store from them too
if(applicationContext instanceof ApplicationContext) {
ProfileStore profileStore = applicationContext.getProfileStore();
for(ProfileSet profileSet : profileSets) {
profileStore.addProfileSet(profileSet);
}
}
}
代码示例来源:origin: smooks/smooks
@SuppressWarnings("ConstantConditions")
private void addProfileSets(List<ProfileSet> profileSets) {
if(profileSets == null) {
return;
}
// TODO Sort out the other app context impls such that we can get the profile store from them too
if(applicationContext instanceof ApplicationContext) {
ProfileStore profileStore = applicationContext.getProfileStore();
for(ProfileSet profileSet : profileSets) {
profileStore.addProfileSet(profileSet);
}
}
}
代码示例来源:origin: org.milyn/milyn-smooks-core
@SuppressWarnings("ConstantConditions")
private void addProfileSets(List<ProfileSet> profileSets) {
if(profileSets == null) {
return;
}
// TODO Sort out the other app context impls such that we can get the profile store from them too
if(applicationContext instanceof ApplicationContext) {
ProfileStore profileStore = applicationContext.getProfileStore();
for(ProfileSet profileSet : profileSets) {
profileStore.addProfileSet(profileSet);
}
}
}
代码示例来源:origin: org.milyn/milyn-smooks-all
@SuppressWarnings("ConstantConditions")
private void addProfileSets(List<ProfileSet> profileSets) {
if(profileSets == null) {
return;
}
// TODO Sort out the other app context impls such that we can get the profile store from them too
if(applicationContext instanceof ApplicationContext) {
ProfileStore profileStore = applicationContext.getProfileStore();
for(ProfileSet profileSet : profileSets) {
profileStore.addProfileSet(profileSet);
}
}
}
代码示例来源:origin: smooks/smooks
/**
* Public Constructor.
* <p/>
* The execution context is constructed within the context of a target profile and
* application context.
* @param targetProfile The target profile (base profile) for this context.
* These parameters are not appended to the supplied requestURI. This arg must be supplied, even if it's empty.
* @param context The application context.
* @param contentEncoding Character encoding to be used when parsing content. Null
* defaults to "UTF-8".
* @param extendedVisitorConfigMap Preconfigured/extended Visitor Configuration Map.
* @throws UnknownProfileMemberException Unknown target profile.
*/
public StandaloneExecutionContext(String targetProfile, ApplicationContext context, String contentEncoding, VisitorConfigMap extendedVisitorConfigMap) throws UnknownProfileMemberException {
if(targetProfile == null) {
throw new IllegalArgumentException("null 'targetProfile' arg in constructor call.");
}
if(context == null) {
throw new IllegalArgumentException("null 'context' arg in constructor call.");
}
this.context = context;
setContentEncoding(contentEncoding);
targetProfileSet = context.getProfileStore().getProfileSet(targetProfile);
deliveryConfig = ContentDeliveryConfigBuilder.getConfig(targetProfileSet, context, extendedVisitorConfigMap);
isDefaultSerializationOn = ParameterAccessor.getBoolParameter(Filter.DEFAULT_SERIALIZATION_ON, true, deliveryConfig);
}
代码示例来源:origin: org.milyn/milyn-smooks-core
/**
* Public Constructor.
* <p/>
* The execution context is constructed within the context of a target profile and
* application context.
* @param targetProfile The target profile (base profile) for this context.
* These parameters are not appended to the supplied requestURI. This arg must be supplied, even if it's empty.
* @param context The application context.
* @param contentEncoding Character encoding to be used when parsing content. Null
* defaults to "UTF-8".
* @param extendedVisitorConfigMap Preconfigured/extended Visitor Configuration Map.
* @throws UnknownProfileMemberException Unknown target profile.
*/
public StandaloneExecutionContext(String targetProfile, ApplicationContext context, String contentEncoding, VisitorConfigMap extendedVisitorConfigMap) throws UnknownProfileMemberException {
if(targetProfile == null) {
throw new IllegalArgumentException("null 'targetProfile' arg in constructor call.");
}
if(context == null) {
throw new IllegalArgumentException("null 'context' arg in constructor call.");
}
this.context = context;
setContentEncoding(contentEncoding);
targetProfileSet = context.getProfileStore().getProfileSet(targetProfile);
deliveryConfig = ContentDeliveryConfigBuilder.getConfig(targetProfileSet, context, extendedVisitorConfigMap);
isDefaultSerializationOn = ParameterAccessor.getBoolParameter(Filter.DEFAULT_SERIALIZATION_ON, true, deliveryConfig);
}
代码示例来源:origin: org.milyn/milyn-smooks-all
/**
* Public Constructor.
* <p/>
* The execution context is constructed within the context of a target profile and
* application context.
* @param targetProfile The target profile (base profile) for this context.
* These parameters are not appended to the supplied requestURI. This arg must be supplied, even if it's empty.
* @param context The application context.
* @param contentEncoding Character encoding to be used when parsing content. Null
* defaults to "UTF-8".
* @param extendedVisitorConfigMap Preconfigured/extended Visitor Configuration Map.
* @throws UnknownProfileMemberException Unknown target profile.
*/
public StandaloneExecutionContext(String targetProfile, ApplicationContext context, String contentEncoding, VisitorConfigMap extendedVisitorConfigMap) throws UnknownProfileMemberException {
if(targetProfile == null) {
throw new IllegalArgumentException("null 'targetProfile' arg in constructor call.");
}
if(context == null) {
throw new IllegalArgumentException("null 'context' arg in constructor call.");
}
this.context = context;
setContentEncoding(contentEncoding);
targetProfileSet = context.getProfileStore().getProfileSet(targetProfile);
deliveryConfig = ContentDeliveryConfigBuilder.getConfig(targetProfileSet, context, extendedVisitorConfigMap);
isDefaultSerializationOn = ParameterAccessor.getBoolParameter(Filter.DEFAULT_SERIALIZATION_ON, true, deliveryConfig);
}
代码示例来源:origin: org.virtuslab/milyn-smooks-core
/**
* Public Constructor.
*
* The execution context is constructed within the context of a target profile and
* application context.
* @param targetProfile The target profile (base profile) for this context.
* These parameters are not appended to the supplied requestURI. This arg must be supplied, even if it's empty.
* @param context The application context.
* @param contentEncoding Character encoding to be used when parsing content. Null
* defaults to "UTF-8".
* @param extendedVisitorConfigMap Preconfigured/extended Visitor Configuration Map.
* @throws UnknownProfileMemberException Unknown target profile.
*/
public StandaloneExecutionContext(String targetProfile, ApplicationContext context, String contentEncoding, VisitorConfigMap extendedVisitorConfigMap) throws UnknownProfileMemberException {
if(targetProfile == null) {
throw new IllegalArgumentException("null 'targetProfile' arg in constructor call.");
}
if(context == null) {
throw new IllegalArgumentException("null 'context' arg in constructor call.");
}
this.context = context;
setContentEncoding(contentEncoding);
targetProfileSet = context.getProfileStore().getProfileSet(targetProfile);
deliveryConfig = ContentDeliveryConfigBuilder.getConfig(targetProfileSet, context, extendedVisitorConfigMap);
isDefaultSerializationOn = ParameterAccessor.getBoolParameter(Filter.DEFAULT_SERIALIZATION_ON, true, deliveryConfig);
}
代码示例来源:origin: smooks/smooks
/**
* Manually register a set of profiles with the profile store associated with the supplied {@link org.milyn.Smooks} instance.
* <p/>
* ProfileSets will typically be registered via the config, but it is useful
* to be able to perform this task manually.
*
* @param profileSet The profile set to be registered.
* @param smooks The {@link org.milyn.Smooks} instance on which to perform the configuration operation.
*/
public static void registerProfileSet(ProfileSet profileSet, Smooks smooks) {
AssertArgument.isNotNull(profileSet, "profileSet");
ProfileStore profileStore = smooks.getApplicationContext().getProfileStore();
try {
profileStore.getProfileSet(profileSet.getBaseProfile());
logger.debug("ProfileSet [" + profileSet.getBaseProfile() + "] already registered. Not registering new profile set.");
} catch (UnknownProfileMemberException e) {
// It's an unregistered profileset...
profileStore.addProfileSet(profileSet);
}
}
代码示例来源:origin: org.milyn/milyn-smooks-core
/**
* Manually register a set of profiles with the profile store associated with the supplied {@link org.milyn.Smooks} instance.
* <p/>
* ProfileSets will typically be registered via the config, but it is useful
* to be able to perform this task manually.
*
* @param profileSet The profile set to be registered.
* @param smooks The {@link org.milyn.Smooks} instance on which to perform the configuration operation.
*/
public static void registerProfileSet(ProfileSet profileSet, Smooks smooks) {
AssertArgument.isNotNull(profileSet, "profileSet");
ProfileStore profileStore = smooks.getApplicationContext().getProfileStore();
try {
profileStore.getProfileSet(profileSet.getBaseProfile());
logger.debug("ProfileSet [" + profileSet.getBaseProfile() + "] already registered. Not registering new profile set.");
} catch (UnknownProfileMemberException e) {
// It's an unregistered profileset...
profileStore.addProfileSet(profileSet);
}
}
代码示例来源:origin: org.virtuslab/milyn-smooks-core
/**
* Manually register a set of profiles with the profile store associated with the supplied {@link org.milyn.Smooks} instance.
*
* ProfileSets will typically be registered via the config, but it is useful
* to be able to perform this task manually.
*
* @param profileSet The profile set to be registered.
* @param smooks The {@link org.milyn.Smooks} instance on which to perform the configuration operation.
*/
public static void registerProfileSet(ProfileSet profileSet, Smooks smooks) {
AssertArgument.isNotNull(profileSet, "profileSet");
ProfileStore profileStore = smooks.getApplicationContext().getProfileStore();
try {
profileStore.getProfileSet(profileSet.getBaseProfile());
logger.debug("ProfileSet [" + profileSet.getBaseProfile() + "] already registered. Not registering new profile set.");
} catch (UnknownProfileMemberException e) {
// It's an unregistered profileset...
profileStore.addProfileSet(profileSet);
}
}
代码示例来源:origin: org.milyn/milyn-smooks-all
/**
* Manually register a set of profiles with the profile store associated with the supplied {@link org.milyn.Smooks} instance.
* <p/>
* ProfileSets will typically be registered via the config, but it is useful
* to be able to perform this task manually.
*
* @param profileSet The profile set to be registered.
* @param smooks The {@link org.milyn.Smooks} instance on which to perform the configuration operation.
*/
public static void registerProfileSet(ProfileSet profileSet, Smooks smooks) {
AssertArgument.isNotNull(profileSet, "profileSet");
ProfileStore profileStore = smooks.getApplicationContext().getProfileStore();
try {
profileStore.getProfileSet(profileSet.getBaseProfile());
logger.debug("ProfileSet [" + profileSet.getBaseProfile() + "] already registered. Not registering new profile set.");
} catch (UnknownProfileMemberException e) {
// It's an unregistered profileset...
profileStore.addProfileSet(profileSet);
}
}
内容来源于网络,如有侵权,请联系作者删除!