This method will try to connect to an ME using the supplied target properties

@param targetType - The type of target
@param targetSignificance - Target significane (preferred or required)
@param target - The name of the target
@throws ResourceException
181077
public void connectUsingTrmWithTargetData(String targetType, String targetSignificance, String target)
                    throws ResourceException
    {
        final String methodName = "connectUsingTrmWithTargetData";
        if (TraceComponent.isAnyTracingEnabled() && TRACE.isEntryEnabled())
        {
            SibTr.entry(this, TRACE, methodName, new Object[] { targetType, targetSignificance, target });
        }

        synchronized (_connections)
        {
            // At this point in the code path we can be sure that:
            // 1. There are no local preferred ME's (this method would not be called if there were)
            // 2. Target data has been set (we are in the else block of the "if (target == null)" block
            // 
            // Since we have been passed target data it means we are attempting to create a connection
            // to a preferred (or required) ME (no target data is ever passed if we are trying to create
            // a connection to a non preferred ME). With this in mind, if we are currently connected to
            // a non preferred ME (_connectToPreferred is false) or we do not currently have a connection
            // then we'll try and create a connection that matches our target data. If a connection
            // is created then we should close any non preferred connections (if they are any).
            if ((!_connectedToPreferred) || (_connections.size() == 0))
            {
                // Set to required (even if user opted for preferred)
                // Pass targetType and target from user data.
                SibRaMessagingEngineConnection newConnection = null;
                try
                {
                    newConnection = new SibRaMessagingEngineConnection(this, _endpointConfiguration.getBusName(),
                                    targetType, SibTrmConstants.TARGET_SIGNIFICANCE_REQUIRED, target);

                    dropNonPreferredConnections();

                    if (newConnection.getConnection() != null) {
                        _connections.put(newConnection.getConnection().getMeUuid(), newConnection);
                        createListener(newConnection);

                    }

                    if (_connections.size() > 0)
                    {
                        _connectedRemotely = checkIfRemote(_connections.values()
                                        .iterator().next());
                        _connectedToPreferred = true;

                        if (TraceComponent.isAnyTracingEnabled() && TRACE.isDebugEnabled())
                        {
                            SibTr.debug(TRACE, "We have connect <remote=" + _connectedRemotely + " > <preferred="
                                               + _connectedToPreferred + ">");
                        }
                    }
                } catch (final SIResourceException exception)
                {
                    // No FFDC code needed
                    // We are potentially connecting remotely so this error may be transient
                    // Possibly the remote ME is not available
                    SibTr.warning(TRACE, SibTr.Suppressor.ALL_FOR_A_WHILE, "TARGETTED_CONNECTION_FAILED_CWSIV0787",
                                  new Object[] { targetType, targetSignificance, target, _endpointConfiguration.getBusName() });
                    if (TraceComponent.isAnyTracingEnabled() && TRACE.isDebugEnabled())
                    {
                        SibTr.debug(TRACE, "Failed to obtain a connection - retry after a set interval");
                    }
                } catch (final SIException exception)
                {
                    FFDCFilter.processException(exception, CLASS_NAME + "." + methodName, "1:711:1.45", this);

                    if (TraceComponent.isAnyTracingEnabled() && TRACE.isEventEnabled())
                    {
                        SibTr.exception(this, TRACE, exception);
                    }

                    throw new ResourceException(NLS.getFormattedMessage("CONNECT_FAILED_CWSIV0782", new Object[] {
                                                                                                                  _endpointConfiguration.getDestination().getDestinationName(),
                                                                                                                  _endpointConfiguration.getBusName(), this, exception }, null), exception);
                }
            }
        } // Sync block

        // Failed to get a preferred one, try for any ME next.
        // Also if we have connected to a remote non preferred ME we may wish to try again for a local
        // non preferred ME (We know there is not a local preferred ME as we would not be in this
        // method if there were).
        if (((_connections.size() == 0) || (_connectedRemotely && !_connectedToPreferred && _destinationStrategy
                        .isDropRemoteNonPreferredForLocalNonPreferred()))
            && (targetSignificance.equals(SibTrmConstants.TARGET_SIGNIFICANCE_PREFERRED)))
        {
            if (TraceComponent.isAnyTracingEnabled() && TRACE.isDebugEnabled())
            {
                SibTr.debug(TRACE,
                            "Could not obtain the preferred connection - try again without any target preferences");
            }
            // For durable pub sub there are no local preferred MEs, for point to point and non durable pub
            // sub then they all count as preferred
            connect(_destinationStrategy.isDurablePubsSub() ? null : getMEsToCheck(), null, null, null, false);
        }

        if (TraceComponent.isAnyTracingEnabled() && TRACE.isEntryEnabled())
        {
            SibTr.exit(TRACE, methodName);
        }
    }
745857
private static Integer getTarget(String targetName) {
        if (targetName.equals("resource")) {
            return AttributeDesignator.RESOURCE_TARGET;
        } else if (targetName.equals("subject")) {
            return AttributeDesignator.SUBJECT_TARGET;
        } else if (targetName.equals("environment")) {
            return AttributeDesignator.ENVIRONMENT_TARGET;
        } else if (targetName.equals("action")) {
            return AttributeDesignator.ACTION_TARGET;
        } else {
            return -1;
        }
    }
1303494
@Override
    public T addAsManifestResource(String resourceName, String target) throws IllegalArgumentException {
        Validate.notNull(resourceName, "ResourceName should be specified");
        Validate.notNull(target, "Target should be specified");

        return addAsManifestResource(fileFromResource(resourceName), target);
    }
783582
@Override
    public void setTargetType(String targetType) {

        if (TraceComponent.isAnyTracingEnabled() && TRACE.isDebugEnabled()) {
            SibTr.debug(this, TRACE, "setTargetType", targetType);
        }
        _targetType = targetType;

    }
1049174
public static void setProperty(Object target, String property, Object value) {
    try {
      InvokerHelper.setProperty(target, property, value);
    } catch (InvokerInvocationException e) {
      ExceptionUtil.sneakyThrow(e.getCause());
    }
  }
943609
public void addRecentTarget(Target target, String media) throws WorkspaceApiException {
    	addRecentTarget(target,media,System.currentTimeMillis());
    }
1071712
public void registerPropertyExclusion( Class target, String propertyName ) {
      if( target != null && propertyName != null ) {
         Set set = (Set) exclusionMap.get( target );
         if( set == null ){
            set = new HashSet();
            exclusionMap.put(  target, set );
         }
         if( !set.contains( propertyName )){
            set.add(propertyName );
         }
      }
   }
797719
@Override
	public TargetProperties lockAndGetTarget( Application app, Instance scopedInstance )
	throws IOException {

		String instancePath = InstanceHelpers.computeInstancePath( scopedInstance );
		String targetId = findTargetId( app, instancePath );
		if( targetId == null )
			throw new IOException( "No target was found for " + app + " :: " + instancePath );

		InstanceContext mappingKey = new InstanceContext( app, instancePath );
		synchronized( LOCK ) {
			saveUsage( mappingKey, targetId, true );
		}

		this.logger.fine( "Target " + targetId + "'s lock was acquired for " + instancePath );
		TargetProperties result = findTargetProperties( app, instancePath );
		Map<String,String> newTargetProperties = TargetHelpers.expandProperties( scopedInstance, result.asMap());

		result.asMap().clear();
		result.asMap().putAll( newTargetProperties );

		return result;
	}
317571
func (s *ListAttributesInput) SetTargetType(v string) *ListAttributesInput {
	s.TargetType = &v
	return s
}
157869
public String addConnectionRequirement(NodeTemplate target, String type, String varName) {
        Map<String, Object> requirement = new LinkedHashMap();
        
        String requirementName = "endpoint";
        Map requirementMap = new LinkedHashMap<String, Object>();
        requirement.put(requirementName, requirementMap);
        requirementMap.put("node", target.getName());
        requirementMap.put("type", type);
        if (!varName.isEmpty()) {
            Map<String, String> properties = new LinkedHashMap();
            properties.put("prop.name", varName);
            requirementMap.put("properties", properties);
        }
        requirements().add(requirement);
        
        return requirementName;
    }
180230
public void addType(String resourceType) {

        m_searchObject.addType(resourceType);
        m_searchObjectChanged = true;
        ValueChangeEvent.fire(this, m_searchObject);
    }
1167989
@Override
    public void setTargetType(String newTargetType) throws JMSException {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(this, tc, "setTargetType", newTargetType);

        // Check for null and empty string, and set to default value if found
        if ((newTargetType == null) || ("".equals(newTargetType))) {
            jcaManagedConnectionFactory.setTargetType(ApiJmsConstants.TARGET_TYPE_BUSMEMBER);
        }
        // Ensure that the value is one of the permitted constants - thrown an exception if not
        else if ((ApiJmsConstants.TARGET_TYPE_BUSMEMBER.equals(newTargetType))
                 || (ApiJmsConstants.TARGET_TYPE_CUSTOM.equals(newTargetType))
                 || (ApiJmsConstants.TARGET_TYPE_ME.equals(newTargetType))) {
            jcaManagedConnectionFactory.setTargetType(newTargetType);
        }
        else {
            throw (JMSException) JmsErrorUtils.newThrowable(
                                                            JMSException.class,
                                                            "INVALID_VALUE_CWSIA0261",
                                                            new Object[] { "remoteTargetType", newTargetType },
                                                            tc
                            );
        }

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(this, tc, "setTargetType");
    }
951849
public function addTarget($targetName, $target)
    {
        if (isset($this->targets[$targetName])) {
            throw new BuildException("Duplicate target: $targetName");
        }
        $this->addOrReplaceTarget($targetName, $target);
    }
135702
public static <TARGET> CopyingConverter<Object, TARGET> forTargetType(final Class<TARGET> target) {
        final Typed<TARGET> targetType = TypeUtils.wrap(target);

        return new Fluent<TARGET>(requireDefaultConstructor(target)) {
            @Override
            public Typed<TARGET> getTargetType() {
                return targetType;
            }
        };
    }
982338
public void setTarget(String target)
    {
        ExtendedInfo info = getInfo(target);
        if (info != null)
            info._target = target;
    }
734894
public void deleteTarget( String targetId ) throws TargetWsException {

		this.logger.finer( "Deleting target " + targetId  );

		WebResource path = this.resource.path( UrlConstants.TARGETS ).path( targetId );
		ClientResponse response = this.wsClient.createBuilder( path )
						.accept( MediaType.APPLICATION_JSON )
						.delete( ClientResponse.class );

		handleResponse( response );
	}
376681
@com.fasterxml.jackson.annotation.JsonProperty("ResourceType")
    public void setResourceType(String resourceType) {
        this.resourceType = resourceType;
    }