/*
(non-Javadoc)
@see javax.slee.resource.ResourceAdaptor#setResourceAdaptorContext(javax.slee.resource.ResourceAdaptorContext)
190701
public void setResourceAdaptorContext(ResourceAdaptorContext raContext) {
		this.raContext = raContext;		
		this.tracer = raContext.getTracer(getClass().getSimpleName());
		this.sleeEndpoint = (SleeEndpoint) raContext.getSleeEndpoint();
		this.eventLookupFacility = raContext.getEventLookupFacility();
		this.providerWrapper = new SleeSipProviderImpl(this);

		try {
			this.defaultUsageParameters =
					(SipResourceAdaptorStatisticsUsageParameters) raContext.getDefaultUsageParameterSet();
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
915034
private void configureDefaultContextPath(DefaultContextPath dcp) {
        String methodName = "configureDefaultContextPath";
        String defaultContextPath = dcp.getValue();

        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
            Tr.debug(tc, methodName + ": defaultContextPath --> " + defaultContextPath);
        }

        if (defaultContextPath != null && !defaultContextPath.isEmpty()) {
            webAppConfiguration.setDefaultContextPath(defaultContextPath);
        }
    }
227270
@Nonnull
  public final JettyStarter setContextPath (@Nonnull @Nonempty final String sContextPath)
  {
    ValueEnforcer.notEmpty (sContextPath, "sContextPath");
    m_sContextPath = sContextPath;
    return this;
  }
996738
public void setContextPath(String contextPath) {

		if (contextPath != null && !contextPath.endsWith("/")) {
			contextPath += "/";
		}
		this.contextPath = contextPath;
	}
1141429
public void setSbbContext(SbbContext context) {
		// save the sbb context in a field
		this.sbbContext = context;
		// get the tracer if needed
		this.tracer = context.getTracer(WakeUpSbb.class.getSimpleName());
		// get jndi environment stuff
		try {
			final Context myEnv = (Context) new InitialContext();
			// slee facilities
			this.timerFacility = (TimerFacility) myEnv
					.lookup(TimerFacility.JNDI_NAME);
			this.nullACIFactory = (NullActivityContextInterfaceFactory) myEnv
					.lookup(NullActivityContextInterfaceFactory.JNDI_NAME);
			this.nullActivityFactory = (NullActivityFactory) myEnv
					.lookup(NullActivityFactory.JNDI_NAME);
			// the sbb interface to interact with SIP resource adaptor
			this.sipProvider = (SleeSipProvider) myEnv
					.lookup("java:comp/env/slee/resources/jainsip/1.2/provider");
		} catch (Exception e) {
			tracer.severe("Failed to set sbb context", e);
		}
	}
762867
@Override
    public void setApplicationContext(ApplicationContext appContext) throws BeansException {
        try (InputStream is = originalResource.getInputStream();) {
            ConfigurableListableBeanFactory beanFactory = ((AbstractRefreshableApplicationContext) appContext)
                    .getBeanFactory();
            StringBuilder sb = new StringBuilder();
            Iterator<String> iter = IOUtils.lineIterator(is, "UTF-8");
            boolean transformed = false;
            
            while (iter.hasNext()) {
                String line = iter.next();
                
                if (line.contains("${")) {
                    transformed = true;
                    line = beanFactory.resolveEmbeddedValue(line);
                }
                
                sb.append(line);
            }
            
            transformedResource = !transformed ? originalResource : new ByteArrayResource(sb.toString().getBytes());
        } catch (IOException e) {
            throw MiscUtil.toUnchecked(e);
        }
    }
1322890
@Override
    public void setApplicationContext(ApplicationContext appContext) throws BeansException {
        if (this.appContext != null) {
            throw new ApplicationContextException("Attempt to reinitialize application context.");
        }
        
        this.appContext = appContext;
    }
102253
public void setResourceAdaptorContext(ResourceAdaptorContext arg0) {
        resourceAdaptorContext = arg0;
        tracer = resourceAdaptorContext.getTracer(HttpClientNIOResourceAdaptor.class.getSimpleName());
        try {
            fireableEventType = resourceAdaptorContext.getEventLookupFacility().getFireableEventType(
                    HttpClientNIOEventTypes.HTTP_CLIENT_NIO_RESPONSE_EVENT_TYPE_ID);
        } catch (Throwable e) {
            throw new RuntimeException(e.getMessage(), e);
        }
        sbbInterface = new HttpClientNIOResourceAdaptorSbbInterfaceImpl(this);
    }
583330
public void setResourceDetails(java.util.Collection<ResourceDetail> resourceDetails) {
        if (resourceDetails == null) {
            this.resourceDetails = null;
            return;
        }

        this.resourceDetails = new java.util.ArrayList<ResourceDetail>(resourceDetails);
    }
1332506
@Override
    public void setResourceAdapter(final ResourceAdapter resourceAdapter) {
        if (TraceComponent.isAnyTracingEnabled() && TRACE.isDebugEnabled()) {
            SibTr.debug(this, TRACE, "setResourceAdapter", resourceAdapter);
        }
        _resourceAdapter = resourceAdapter;
    }
1173920
@Override
    public void initialize(BeanContext context) {
        Resource resource = ConsoleUtil.getConsoleResource(context);
        initialize(context, ResourceHandle.use(resource));
    }
839618
protected Context createContext() throws NamingException
   {
      Properties properties = new Properties();
      properties.setProperty("java.naming.factory.initial", "org.jnp.interfaces.LocalOnlyContextFactory");
      properties.setProperty("java.naming.factory.url.pkgs", "org.jboss.naming:org.jnp.interfaces");
      properties.setProperty(Context.PROVIDER_URL, jndiProtocol + "://" + jndiHost + ":" + jndiPort);
      return new InitialContext(properties);
   }
1250206
public void setContext(Context context) {
        log = Log.instance(context);
        options = Options.instance(context);
        classLoaderClass = options.get("procloader");

        // Avoid initializing Lint
        boolean warn = options.isLintSet("path");
        locations.update(log, warn, FSInfo.instance(context));

        // Setting this option is an indication that close() should defer actually closing
        // the file manager until after a specified period of inactivity.
        // This is to accomodate clients which save references to Symbols created for use
        // within doclets or annotation processors, and which then attempt to use those
        // references after the tool exits, having closed any internally managed file manager.
        // Ideally, such clients should run the tool via the javax.tools API, providing their
        // own file manager, which can be closed by the client when all use of that file
        // manager is complete.
        // If the option has a numeric value, it will be interpreted as the duration,
        // in seconds, of the period of inactivity to wait for, before the file manager
        // is actually closed.
        // See also deferredClose().
        String s = options.get("fileManager.deferClose");
        if (s != null) {
            try {
                deferredCloseTimeout = (int) (Float.parseFloat(s) * 1000);
            } catch (NumberFormatException e) {
                deferredCloseTimeout = 60 * 1000;  // default: one minute, in millis
            }
        }
    }
360766
public final void setDialogBackground(@DrawableRes final int resourceId) {
        this.dialogBackground = ContextCompat.getDrawable(getContext(), resourceId);
        this.dialogBackgroundBitmap = null;
        this.dialogBackgroundId = resourceId;
        this.dialogBackgroundColor = -1;
    }
809893
public void setResourceType(java.util.Collection<StringFilter> resourceType) {
        if (resourceType == null) {
            this.resourceType = null;
            return;
        }

        this.resourceType = new java.util.ArrayList<StringFilter>(resourceType);
    }
336906
@Override
    public void afterPropertiesSet() throws Exception {
        final Map<String, Set<String>> resultAttributeMapping = this.getResultAttributeMapping();
        if (this.setReturningAttributes && resultAttributeMapping != null) {
            this.searchControls.setReturningAttributes(resultAttributeMapping.keySet().toArray(new String[resultAttributeMapping.size()]));
        }

        if (this.contextSource == null) {
            throw new BeanCreationException("contextSource must be set");
        }
    }
1244184
public void setContext(Context context) {
    super.setContext(context);
    if (null != context) {
      Object count = context.getDatas().get("countPerSheet");
      if (null != count && Numbers.isDigits(count.toString())) {
        int countParam = Numbers.toInt(count.toString());
        if (countParam > 0) this.countPerSheet = countParam;
      }
    }
  }