/* (non-Javadoc)
@see com.ibm.wsspi.sib.extension.ConsumerSet#setFlowProperties(com.ibm.wsspi.sib.extension.Flow[])
770175
public void setFlowProperties(Flow[] flows)
    throws SIIncorrectCallException
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.entry(tc, "setFlowProperties", flows);

    try
    {
      // Take the Write Lock for classifications
      classificationWriteLock.lock();

      // Disallow null flows
      if(flows == null)
      {
        SIIncorrectCallException e =
          new SIIncorrectCallException(
            nls.getFormattedMessage(
                "NULL_FLOW_CLASSIFICATIONS_CWSIP0851",
                new Object[] {
                  "com.ibm.ws.sib.processor.impl.JSConsumerSet.setFlowProperties",
                  "1:877:1.16",
                  label },
                null));
        
        // FFDC
        FFDCFilter.processException(
          e,
          "com.ibm.ws.sib.processor.impl.JSConsumerSet.setFlowProperties",
          "1:885:1.16",
          this);
            
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) 
          SibTr.exit(tc, "setFlowProperties", "SIIncorrectCallException");
        throw e;
      }
    
      // Set up the new classifications for the ConsumerSet
      boolean weightChangeOnly = classifications.setClassifications(flows);
    
      // Need to notify registered keys of the change but only if the flow change is
      // substantive - i.e. more than just a change in the relative weightings of the 
      // current flows.
      if(!weightChangeOnly)
      {
        Iterator<DispatchableKey> it = keyRegistry.iterator();
        while (it.hasNext())
        {
          DispatchableKey key = (DispatchableKey)it.next();
          // Notify the appropriate key
          if(key instanceof LocalQPConsumerKey)
          {
            ((LocalQPConsumerKey)(key)).notifyResetFlowProperties();
          }
          else if(key instanceof LocalQPConsumerKeyGroup)
          {
            ((LocalQPConsumerKeyGroup)(key)).notifyResetFlowProperties();
          }
        }
      }
    }
    catch(InvalidFlowsException ife)
    {
      // FFDC
      FFDCFilter.processException(
        ife,
        "com.ibm.ws.sib.processor.impl.JSConsumerSet.setFlowProperties",
        "1:923:1.16",
        this);
      
      // Map the InvalidFlowsException to an SIIncorrectCallException
      SIIncorrectCallException e =
        new SIIncorrectCallException(
          nls.getFormattedMessage(
              "INVALID_FLOW_CLASSIFICATIONS_CWSIP0852",
              new Object[] {
                "com.ibm.ws.sib.processor.impl.JSConsumerSet.setFlowProperties",
                "1:933:1.16",
                label },
              null));
          
      if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) 
        SibTr.exit(tc, "setFlowProperties", "SIIncorrectCallException");
      throw e;
    }
    finally
    {
      // Free the write lock
      classificationWriteLock.unlock();
    }
    
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.exit(tc, "setFlowProperties");        
  }
524752
synchronized void setProperties(Map<Object, Object> m) throws ChannelFactoryPropertyIgnoredException {
        this.myProperties = m;

        if (cf != null) {
            cf.updateProperties(m);
        }
    }
323796
@Override
	public synchronized void setProperties(Map<Object, Object> properties)
	{
		if(this.properties == null)
			this.properties = new Properties();
		
		
		this.properties.putAll(properties);
	}
665144
public InterceptorConfigurationBuilder withProperties(Properties properties) {
      attributes.attribute(PROPERTIES).set(TypedProperties.toTypedProperties(properties));
      return this;
   }
215083
public void setUserProperties(Map userData) throws SIResourceException
    {
      if (tc.isEntryEnabled())
        SibTr.entry(tc, "setUserProperties", 
          new Object[] { userData });
 
      _consumerDispatcher.getConsumerDispatcherState().setUserData(userData);
      
      Transaction tran = _messageProcessor.getTXManager().createAutoCommitTransaction();
      if( !_consumerDispatcher.getReferenceStream().isUpdating() )
      {
        try 
        {
          _consumerDispatcher.getReferenceStream().requestUpdate(tran);
        } 
        catch (MessageStoreException e) 
        {
          // MessageStoreException shouldn't occur so FFDC.
          FFDCFilter.processException(
          e,
          "com.ibm.ws.sib.processor.impl.MPSubscriptionImpl.setUserProperties",
          "1:269:1.6",
          this);
  
          SibTr.exception(tc, e);
          if (tc.isEntryEnabled()) SibTr.exit(tc, "setUserProperties", "SIResourceException");
          throw new SIResourceException(e);
            
        }
      }
      
      if (tc.isEntryEnabled())
        SibTr.exit(tc, "setUserProperties"); 
      
    }
839564
public static void addEmailPropsToFlow(final Flow flow, final Props prop) {
    final List<String> successEmailList =
        prop.getStringList(CommonJobProperties.SUCCESS_EMAILS,
            Collections.EMPTY_LIST);
    final Set<String> successEmail = new HashSet<>();
    for (final String email : successEmailList) {
      successEmail.add(email.toLowerCase());
    }

    final List<String> failureEmailList =
        prop.getStringList(CommonJobProperties.FAILURE_EMAILS,
            Collections.EMPTY_LIST);
    final Set<String> failureEmail = new HashSet<>();
    for (final String email : failureEmailList) {
      failureEmail.add(email.toLowerCase());
    }

    final List<String> notifyEmailList =
        prop.getStringList(CommonJobProperties.NOTIFY_EMAILS,
            Collections.EMPTY_LIST);
    for (String email : notifyEmailList) {
      email = email.toLowerCase();
      successEmail.add(email);
      failureEmail.add(email);
    }

    flow.addFailureEmails(failureEmail);
    flow.addSuccessEmails(successEmail);
  }
197260
public void setFlowLogs(java.util.Collection<FlowLog> flowLogs) {
        if (flowLogs == null) {
            this.flowLogs = null;
            return;
        }

        this.flowLogs = new com.amazonaws.internal.SdkInternalList<FlowLog>(flowLogs);
    }
680131
public void setProperties( Map<String,String> properties ) {
        Map<String,String> userProperties = systemSession.getUserProperties();
        if ( userProperties == null ) {
            userProperties = new HashMap<String,String>();
        }
        userProperties.putAll( properties );
        
        log.debug( "Session userProperties: {}", userProperties );
        
        systemSession = (MavenRepositorySystemSession)systemSession.setUserProperties( userProperties );
        
    }
678185
@Override
    public void populateClientProperties(Client client, Map<String, Object> properties)
    {
        this.clientProperties = properties;
    }
1370599
public void setCustomProperties() {
		if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
			SibTr.entry(tc, "setCustomProperties", this);

		// Set the properties that belong to the bus
		/*
		 * List props =
		 * ((ConfigObject)getEObject()).getObjectList(CT_SIBus.PROPERTIES_NAME);
		 * for (Iterator iter = props.iterator(); iter.hasNext();) {
		 * ConfigObject p = (ConfigObject)iter.next(); String name =
		 * p.getString(CT_Property.NAME_NAME, CT_Property.NAME_DEFAULT); String
		 * value = p.getString(CT_Property.VALUE_NAME,
		 * CT_Property.VALUE_DEFAULT); setCustomProperty(name, value); }
		 */

		if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
			SibTr.exit(tc, "setCustomProperties");
	}
757169
public static void setPropsInYamlFile(final String path, final File flowFile, final Props prop) {
    final DumperOptions options = new DumperOptions();
    options.setDefaultFlowStyle(FlowStyle.BLOCK);
    final NodeBean nodeBean = FlowLoaderUtils.setPropsInNodeBean(path, flowFile, prop);
    try (final BufferedWriter writer = Files
        .newBufferedWriter(flowFile.toPath(), StandardCharsets.UTF_8)) {
      new Yaml(options).dump(nodeBean, writer);
    } catch (final IOException e) {
      throw new ProjectManagerException(
          "Failed to set properties in flow file " + flowFile.getName());
    }
  }
328658
private void setRequestProperties() {
        inboundRequestMsg.setPipeliningEnabled(pipeliningEnabled); //Value of listener config
        String connectionHeaderValue = inboundRequestMsg.getHeader(HttpHeaderNames.CONNECTION.toString());
        String httpVersion = (String) inboundRequestMsg.getProperty(Constants.HTTP_VERSION);
        inboundRequestMsg.setKeepAlive(isKeepAliveConnection(keepAliveConfig, connectionHeaderValue,
                httpVersion));
    }
1014633
protected void augmentMultifactorProviderFlowRegistry(final FlowDefinitionRegistry mfaProviderFlowRegistry) {
        val flowIds = mfaProviderFlowRegistry.getFlowDefinitionIds();
        Arrays.stream(flowIds).forEach(id -> {
            val flow = (Flow) mfaProviderFlowRegistry.getFlowDefinition(id);
            if (flow != null && containsFlowState(flow, CasWebflowConstants.STATE_ID_REAL_SUBMIT)) {
                val states = getCandidateStatesForMultifactorAuthentication();
                states.forEach(s -> {
                    val state = getState(flow, s);
                    ensureEndStateTransitionExists(state, flow, CasWebflowConstants.TRANSITION_ID_SUCCESS, CasWebflowConstants.STATE_ID_SUCCESS);
                    ensureEndStateTransitionExists(state, flow, CasWebflowConstants.TRANSITION_ID_SUCCESS_WITH_WARNINGS, CasWebflowConstants.TRANSITION_ID_SUCCESS_WITH_WARNINGS);
                    ensureEndStateTransitionExists(state, flow, CasWebflowConstants.TRANSITION_ID_UNAVAILABLE, CasWebflowConstants.STATE_ID_MFA_UNAVAILABLE);
                    ensureEndStateTransitionExists(state, flow, CasWebflowConstants.TRANSITION_ID_DENY, CasWebflowConstants.STATE_ID_MFA_DENIED);
                });
            }
        });

    }
779717
@Override
    public void setProperties(Properties properties) {
        if (this.env == null) {
            this.env = properties;
        } else {
            this.env.putAll(properties);
        }

        if (baseGateway != null) {
            baseGateway.setProperties(properties);
        }
    }
1247324
@InterfaceAudience.Public
    public void setUserProperties(Map<String, Object> userProperties) {
        Map<String, Object> newProps = new HashMap<String, Object>();
        newProps.putAll(userProperties);
        for (String key : properties.keySet()) {
            if (key.startsWith("_")) {
                newProps.put(key, properties.get(key));  // Preserve metadata properties
            }
        }
        properties = newProps;
    }
373844
protected void createDefaultActionStates(final Flow flow) {
        createRealSubmitAction(flow);
        createInitialAuthenticationRequestValidationCheckAction(flow);
        createCreateTicketGrantingTicketAction(flow);
        createSendTicketGrantingTicketAction(flow);
        createGenerateServiceTicketAction(flow);
        createGatewayServicesMgmtAction(flow);
        createServiceAuthorizationCheckAction(flow);
        createRedirectToServiceActionState(flow);
        createHandleAuthenticationFailureAction(flow);
        createTerminateSessionAction(flow);
        createTicketGrantingTicketCheckAction(flow);
    }
831222
public static HystrixThreadPoolProperties.Setter initializeThreadPoolProperties(List<HystrixProperty> properties) throws IllegalArgumentException {
        return initializeProperties(HystrixThreadPoolProperties.Setter(), properties, TP_PROP_MAP, "thread pool");
    }