/*
(non-Javadoc)

@see com.ibm.ws.sib.processor.impl.interfaces.DestinationHandler#isSendAllowed()
178296
@Override
    public boolean isSendAllowed()
    {
        if (tc.isEntryEnabled())
            SibTr.entry(tc, "isSendAllowed");

        boolean isSendAllowed = true;

        // We check first whether send is disallowed at the bus definition level. A 
        // setting at the bus level overrides a setting on the Foreign Destination
        // Definition.
        if (_sendAllowedOnTargetForeignBus != null)
            isSendAllowed = _sendAllowedOnTargetForeignBus.booleanValue();

        // If allowed at the bus level, check at the foreign dest def level
        if (isSendAllowed)
            isSendAllowed = _definition.isSendAllowed();

        if (tc.isEntryEnabled())
            SibTr.exit(tc, "isSendAllowed", new Boolean(isSendAllowed));

        return isSendAllowed;
    }
604186
protected boolean isSendAllowed(String message, List<?> arguments) {
        // check internal handlers first
        for (ISharedObjectSecurity handler : securityHandlers) {
            if (!handler.isSendAllowed(this, message, arguments)) {
                return false;
            }
        }
        // check global SO handlers next
        final Set<ISharedObjectSecurity> handlers = getSecurityHandlers();
        if (handlers == null) {
            return true;
        }
        for (ISharedObjectSecurity handler : handlers) {
            if (!handler.isSendAllowed(this, message, arguments)) {
                return false;
            }
        }
        return true;
    }
114437
private boolean isPartitionAssignmentAllowed() {
        if (!node.getNodeExtension().isStartCompleted()) {
            logger.warning("Partitions can't be assigned since startup is not completed yet.");
            return false;
        }

        ClusterState clusterState = node.getClusterService().getClusterState();
        if (!clusterState.isMigrationAllowed()) {
            logger.warning("Partitions can't be assigned since cluster-state= " + clusterState);
            return false;
        }
        if (partitionService.isFetchMostRecentPartitionTableTaskRequired()) {
            logger.warning("Partitions can't be assigned since most recent partition table is not decided yet.");
            return false;
        }
        return true;
    }
1210840
@Override
    public boolean isSendAllowed()
    {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(tc, "isSendAllowed");

        boolean isSendAllowed = true;

        // We check first whether send is disallowed at the bus definition level. A
        // setting at the bus level overrides a setting on the Alias Destination
        // Definition.
        DestinationHandler target = getTarget();
        if (_sendAllowedOnTargetForeignBus != null)
            isSendAllowed = _sendAllowedOnTargetForeignBus.booleanValue();

        ExtendedBoolean aliasIsSendAllowed = _definition.isSendAllowed();

        // If we're allowed to send at the bus level, or there is no Foreign
        // Bus target in the chain, then move to the next level of checking.
        if (isSendAllowed)
        {
            // A setting of NONE signals use target value.
            if (aliasIsSendAllowed.equals(ExtendedBoolean.NONE))
            {
                isSendAllowed = target.isSendAllowed();
            }
            else if (aliasIsSendAllowed.equals(ExtendedBoolean.FALSE))
            {
                isSendAllowed = false;
            }
            else
            {
                isSendAllowed = true;
            }
        }
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(tc, "isSendAllowed", Boolean.valueOf(isSendAllowed));

        return isSendAllowed;
    }
135269
@Pure
	public boolean isEndingBusHalt() {
		final BusItinerary itinerary = getContainer();
		if (itinerary != null && itinerary.isValidPrimitive()) {
			final int count = itinerary.getValidBusHaltCount();
			if (count > 0) {
				try {
					return itinerary.getBusHaltAt(count - 1) == this;
				} catch (IndexOutOfBoundsException exception) {
					// invalid halt
				}
			}
		}
		return false;
	}
337852
private Collection<String> processAllowedEndpoints(Collection<String> endpointIds) {
        if (endpointIds == null || endpointIds.isEmpty())
            return null;

        return endpointIds;
    }
890258
protected void ensureTransitionAllowed(CmmnActivityExecution execution, CaseExecutionState expected, CaseExecutionState target, String transition) {
    String id = execution.getId();

    CaseExecutionState currentState = execution.getCurrentState();

    // the state "suspending" or "terminating" will set immediately
    // inside the corresponding AtomicOperation, that's why the
    // previous state will be used to ensure that the transition
    // is allowed.
    if (execution.isTerminating() || execution.isSuspending()) {
      currentState = execution.getPreviousState();
    }

    // is the case execution already in the target state
    if (target.equals(currentState)) {
      throw LOG.isAlreadyInStateException(transition, id, target);

    } else
    // is the case execution in the expected state
    if (!expected.equals(currentState)) {
      throw LOG.unexpectedStateException(transition, id, expected, currentState);
    }
  }
1040542
protected Boolean isAllowed(CmsPermissionSet p, int value) {

        if ((p.getAllowedPermissions() & value) > 0) {
            return Boolean.TRUE;
        }
        return Boolean.FALSE;
    }
19966
protected static String determineMethodsAllowed( StoredObject so ) {

        try {
            if (so != null) {
                if (so.isNullResource()) {

                    return NULL_RESOURCE_METHODS_ALLOWED;

                } else if (so.isFolder()) {
                    return RESOURCE_METHODS_ALLOWED + FOLDER_METHOD_ALLOWED;
                }
                // else resource
                return RESOURCE_METHODS_ALLOWED;
            }
        } catch (Exception e) {
            // we do nothing, just return less allowed methods
        }

        return LESS_ALLOWED_METHODS;
    }
1069883
public void setSendAllowed(boolean newIsSendAllowedValue)
    {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(tc, "setSendAllowed", new Boolean(newIsSendAllowedValue));

        this._isSendAllowed = newIsSendAllowedValue;
        updatePutRegistration(_isSendAllowed);

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(tc, "setSendAllowed");
    }
559069
public R endClosed(@Nonnull T end) {
    this.end = Preconditions.checkNotNull(end, "End can't be null");
    this.endBound = BoundType.CLOSED;
    return thisT();
  }
1041637
public boolean isFileServingEnabled() {
        // PK54499 START
        disallowAllFileServingProp = WCCustomProperties.DISALLOW_ALL_FILE_SERVING;
        if (disallowAllFileServingProp != null && !this.getApplicationName().equalsIgnoreCase("isclite")) {
            try
            {
                if (Boolean.valueOf(disallowAllFileServingProp).booleanValue())
                {
                    this.fileServingEnabled = Boolean.FALSE;
                }
                if (com.ibm.ejs.ras.TraceComponent.isAnyTracingEnabled() && logger.isLoggable(Level.FINE))
                {
                    logger.logp(Level.FINE, CLASS_NAME, "isFileServing", "PK54499: disallowAllFileServingProp set to " + disallowAllFileServingProp + " for application: "
                                    + this.getApplicationName());
                }
            }
            catch (Exception x)
            {
                logger.logp(Level.SEVERE, CLASS_NAME, "isFileServing", "Illegal value set for property com.ibm.ws.webcontainer.disallowallfileserving");
            }
        }
        // PK54499 END

        if (this.fileServingEnabled != null)
            return this.fileServingEnabled.booleanValue();

        return WCCustomProperties.FILE_SERVING_ENABLED;
    }
1154140
protected boolean isDeleteAllowed(String key) {
        // check internal handlers first
        for (ISharedObjectSecurity handler : securityHandlers) {
            if (!handler.isDeleteAllowed(this, key)) {
                return false;
            }
        }
        // check global SO handlers next
        final Set<ISharedObjectSecurity> handlers = getSecurityHandlers();
        if (handlers == null) {
            return true;
        }
        for (ISharedObjectSecurity handler : handlers) {
            if (!handler.isDeleteAllowed(this, key)) {
                return false;
            }
        }
        return true;
    }
191981
public static boolean isPutAllPermitted(Field destination,Field source){
		
		boolean isFirst = true;
		boolean isAddAllFunction = false;
		boolean isPutAllFunction = true;
		return isAssignableFrom(getGenericString(destination), getGenericString(source), destination.getType(), source.getType(), isFirst, isAddAllFunction, isPutAllFunction);
		
	}
1197491
@Override
    public OutputHandler getLocalPostMedPtoPOH(boolean localMessage,
                                               boolean forcePut,
                                               boolean singleServer)
    {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(tc,
                        "getLocalPostMedPtoPOH",
                        new Object[] { Boolean.valueOf(localMessage),
                                      Boolean.valueOf(forcePut),
                                      Boolean.valueOf(singleServer),
                                      this });

        OutputHandler result = null;

        //check that the localisation is not full or send inhibited
        boolean isSendAllowed = true;
        boolean isAtQueueHighLimit = false;

        //Only check elsewhere in an ND environment.  In a single server
        //environment, the message must be put locally
        if (!singleServer)
        {
            try
            {
                //send allowed can only be false if forcePut is false
                isSendAllowed =
                                forcePut || _pToPLocalMsgsItemStream.isSendAllowed();

                //Only check queue high limit if the message was put locally
                //and if forcePut is false
                if (!forcePut && localMessage)
                {
                    isAtQueueHighLimit = _pToPLocalMsgsItemStream.isQHighLimit();
                }
            } catch (Exception e)
            {
                //No FFDC code needed
                isSendAllowed = true;
                isAtQueueHighLimit = false;
            }
        }

        if (isSendAllowed && !isAtQueueHighLimit)
        {
            result =
                            _localisationManager.
                                            getQueuePointOutputHandler(_messageProcessor.getMessagingEngineUuid());
        }

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(tc, "getLocalPostMedPtoPOH", result);

        return result;
    }
481536
public final void checkPermission( Destination destination , String action ) throws JMSException
    {
    	if (securityContext == null)
            return; // Security is disabled
    	
    	DestinationRef destinationRef = DestinationTools.asRef(destination);
    	securityContext.checkPermission(destinationRef.getResourceName(), action);        
    }
562338
@Override
    public int checkAbleToAcceptMessage(JsDestinationAddress addr)
    {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(tc, "checkAbleToAcceptMessage", addr);

        int blockingReason = DestinationHandler.OUTPUT_HANDLER_FOUND;
        //we check the remoteQueueHighLimit in this case. 
        //See defect 281311
        boolean canAccept = !_itemStream.isRemoteQueueHighLimit();

        if (!canAccept)
        {
            blockingReason = DestinationHandler.OUTPUT_HANDLER_ALL_HIGH_LIMIT;
            //117505
            long destHighMsg = _itemStream.getDestHighMsgs();
            SibTr.info(tc, "NOTIFY_DEPTH_THRESHOLD_REACHED_CWSIP0553",
                       new Object[] { _destination.getName(), _messageProcessor.getMessagingEngineName(), destHighMsg });
        }
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(tc, "checkAbleToAcceptMessage", Integer.valueOf(blockingReason));
        return blockingReason;
    }