/** * This will do a copy of the properties from this context object * to the properties of the specified context object. * * @param context The ServiceContext object to hold the merged properties * @param doParentProperties Indicates whether to go up the context hierachy * copy the properties at each level */ public void putContextProperties(ServiceContext context, boolean doParentProperties) { if (context != null) { // get the current properties on this context object Map<String, Object> props = getProperties(); // copy them to the specified context object context.mergeProperties(props); if (doParentProperties) { ServiceGroupContext mySGC = null; if (serviceGroupContext != null) { mySGC = serviceGroupContext; } else if (metaParent != null) { mySGC = metaParent; } if (mySGC != null) { ServiceGroupContext sgc = context.getServiceGroupContext(); mySGC.putContextProperties(sgc); } } } }
/** * This will do a copy of the properties from this context object * to the properties of the specified context object. * * @param context The ServiceContext object to hold the merged properties * @param doParentProperties Indicates whether to go up the context hierachy * copy the properties at each level */ public void putContextProperties(ServiceContext context, boolean doParentProperties) { if (context != null) { // get the current properties on this context object Map<String, Object> props = getProperties(); // copy them to the specified context object context.mergeProperties(props); if (doParentProperties) { ServiceGroupContext mySGC = null; if (serviceGroupContext != null) { mySGC = serviceGroupContext; } else if (metaParent != null) { mySGC = metaParent; } if (mySGC != null) { ServiceGroupContext sgc = context.getServiceGroupContext(); mySGC.putContextProperties(sgc); } } } }
metaParent.putContextProperties(existingSGC);
metaParent.putContextProperties(existingSGC);