当前位置: 首页>>代码示例>>Java>>正文


Java JavaUtils.isTrueExplicitly方法代码示例

本文整理汇总了Java中org.apache.axis2.util.JavaUtils.isTrueExplicitly方法的典型用法代码示例。如果您正苦于以下问题:Java JavaUtils.isTrueExplicitly方法的具体用法?Java JavaUtils.isTrueExplicitly怎么用?Java JavaUtils.isTrueExplicitly使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.apache.axis2.util.JavaUtils的用法示例。


在下文中一共展示了JavaUtils.isTrueExplicitly方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: invoke

import org.apache.axis2.util.JavaUtils; //导入方法依赖的package包/类
public InvocationResponse invoke(MessageContext msgContext) throws AxisFault {
    Object flag = msgContext.getLocalProperty(IS_ADDR_INFO_ALREADY_PROCESSED);
    if (log.isTraceEnabled()) {
        log.trace("invoke: IS_ADDR_INFO_ALREADY_PROCESSED=" + flag);
    }

    if (JavaUtils.isTrueExplicitly(flag)) {
        // Check if the wsa:MessageID is required or not.
        checkMessageIDHeader(msgContext);
        
        // Check that if wsamInvocationPattern flag is in effect that the replyto and faultto are valid.
        if (JavaUtils.isTrue(msgContext.getProperty(ADDR_VALIDATE_INVOCATION_PATTERN), true)) {
            checkWSAMInvocationPattern(msgContext);
        }
    }
    else {
        // Check that if wsaddressing=required that addressing headers were found inbound
        checkUsingAddressing(msgContext);
    }

    return InvocationResponse.CONTINUE;
}
 
开发者ID:wso2,项目名称:wso2-axis2,代码行数:23,代码来源:AddressingValidationHandler.java

示例2: addElementToSequence

import org.apache.axis2.util.JavaUtils; //导入方法依赖的package包/类
private void addElementToSequence(String name,
                                  QName propertyQName,
                                  XmlSchemaSequence sequence,
                                  boolean isBase64Binary,
                                  boolean isArryType,
                                  boolean isPrimitive) {
    XmlSchemaElement elt1 = new XmlSchemaElement();
    elt1.setName(name);
    elt1.setSchemaTypeName(propertyQName);
    sequence.getItems().add(elt1);
    if (isArryType && !isBase64Binary) {
        elt1.setMaxOccurs(Long.MAX_VALUE);
    }
    elt1.setMinOccurs(0);

    boolean disallowNillables = false;
    Parameter param = service.getParameter(Java2WSDLConstants.DISALLOW_NILLABLE_ELEMENTS_OPTION_LONG);
    if (param != null) {
        disallowNillables = JavaUtils.isTrueExplicitly(param.getValue());
    }

    if (!isPrimitive && !disallowNillables) {
        elt1.setNillable(true);
    }
}
 
开发者ID:wso2,项目名称:wso2-axis2,代码行数:26,代码来源:DefaultSchemaGenerator.java

示例3: initParams

import org.apache.axis2.util.JavaUtils; //导入方法依赖的package包/类
/**
 * Initializes the Axis2 parameters.
 */
protected void initParams() {
    Parameter parameter;
    // do we need to completely disable REST support
    parameter = axisConfiguration.getParameter(Constants.Configuration.DISABLE_REST);
    if (parameter != null) {
        disableREST = !JavaUtils.isFalseExplicitly(parameter.getValue());
    }

    // Should we close the reader(s)
    parameter = axisConfiguration.getParameter("axis2.close.reader");
    if (parameter != null) {
        closeReader = JavaUtils.isTrueExplicitly(parameter.getValue());
    }

}
 
开发者ID:wso2,项目名称:wso2-axis2,代码行数:19,代码来源:AxisServlet.java

示例4: getTargetAddress

import org.apache.axis2.util.JavaUtils; //导入方法依赖的package包/类
public URL getTargetAddress(MessageContext messageContext, OMOutputFormat format, URL targetURL)
        throws AxisFault {

    // Check whether there is a template in the URL, if so we have to replace then with data
    // values and create a new target URL.
    targetURL = URLTemplatingUtil.getTemplatedURL(targetURL, messageContext, true);
    String ignoreUncited =
            (String) messageContext.getProperty(WSDL2Constants.ATTR_WHTTP_IGNORE_UNCITED);

    // Need to have this check here cause         
    if (ignoreUncited == null || !JavaUtils.isTrueExplicitly(ignoreUncited)) {
        String httpMethod = (String) messageContext.getProperty(Constants.Configuration.HTTP_METHOD);
        if (Constants.Configuration.HTTP_METHOD_GET.equals(httpMethod) || Constants.Configuration.HTTP_METHOD_DELETE.equals(httpMethod)) {
            targetURL = URLTemplatingUtil.appendQueryParameters(messageContext, targetURL);
        }
    } else {
        messageContext.getEnvelope().getBody().getFirstElement().detach();
    }

    return targetURL;
}
 
开发者ID:wso2,项目名称:wso2-axis2,代码行数:22,代码来源:XFormURLEncodedFormatter.java

示例5: isDoingREST

import org.apache.axis2.util.JavaUtils; //导入方法依赖的package包/类
public static boolean isDoingREST(MessageContext msgContext) {
    boolean enableREST = false;

    // check whether isDoingRest is already true in the message context
    if (msgContext.isDoingREST()) {
        return true;
    }

    Object enableRESTProperty = msgContext.getProperty(Constants.Configuration.ENABLE_REST);
    if (enableRESTProperty != null) {
        enableREST = JavaUtils.isTrueExplicitly(enableRESTProperty);
    }

    msgContext.setDoingREST(enableREST);

    return enableREST;
}
 
开发者ID:wso2,项目名称:wso2-axis2,代码行数:18,代码来源:TransportUtils.java

示例6: isServiceDiscoveryEnabled

import org.apache.axis2.util.JavaUtils; //导入方法依赖的package包/类
/**
 * Check whether service discovery is enabled in the configuration. This method first checks
 * whether the DiscoveryConstants.DISCOVERY_PROXY parameter is set in the given AxisConfiguration.
 * If not it checks whether service discovery status is set to 'true' in the configuration
 * registry. If discovery is enabled in the registry configuration, this method will also
 * add the corresponding parameter to AxisConfiguration.
 *
 * @param axisConfig AxisConfiguration
 * @return service discovery status
 * @throws RegistryException if an error occurs while accessing the registry
 */
public static boolean isServiceDiscoveryEnabled(AxisConfiguration axisConfig) throws RegistryException {
    Parameter parameter = getDiscoveryParam(axisConfig);
    if (parameter != null) {
        return true;
    }

    String path = DISCOVERY_CONFIG_ROOT + DISCOVERY_PUBLISHER_CONFIG;

    Registry registry = PrivilegedCarbonContext.getThreadLocalCarbonContext().
            getRegistry(RegistryType.SYSTEM_CONFIGURATION);
    if (registry.resourceExists(path)) {
        Resource publisherConfig = registry.get(path);
        String status = publisherConfig.getProperty(DISCOVERY_PUBLISHER_STATUS);
        publisherConfig.discard();
        boolean enabled = JavaUtils.isTrueExplicitly(status);

        if (enabled) {
            String discoveryProxyURL = getDiscoveryProxyURL(registry);
            try {
                Parameter discoveryProxyParam =
                        ParameterUtil.createParameter(DiscoveryConstants.DISCOVERY_PROXY,
                                                      discoveryProxyURL);
                axisConfig.addParameter(discoveryProxyParam);
            } catch (AxisFault axisFault) {
                axisFault.printStackTrace();  //TODO
            }
        }
        return enabled;
    }

    return false;
}
 
开发者ID:wso2,项目名称:carbon-commons,代码行数:44,代码来源:DiscoveryMgtUtils.java

示例7: processMTOM10Assertion

import org.apache.axis2.util.JavaUtils; //导入方法依赖的package包/类
private void processMTOM10Assertion(OMElement element,
        MTOM10Assertion mtomAssertion) {

    // Checking wsp:Optional attribute
    String value = element
            .getAttributeValue(Constants.Q_ELEM_OPTIONAL_ATTR);
    boolean isOptional = JavaUtils.isTrueExplicitly(value);

    mtomAssertion.setOptional(isOptional);

}
 
开发者ID:wso2,项目名称:wso2-axis2,代码行数:12,代码来源:MTOM10AssertionBuilder.java

示例8: shouldInvoke

import org.apache.axis2.util.JavaUtils; //导入方法依赖的package包/类
public boolean shouldInvoke(MessageContext msgContext) throws AxisFault {
    //Set the defaults on the message context.
    msgContext.setProperty(DISABLE_ADDRESSING_FOR_OUT_MESSAGES, Boolean.TRUE);
    msgContext.setProperty(IS_ADDR_INFO_ALREADY_PROCESSED, Boolean.FALSE);

    //Determine if we want to ignore addressing headers. This parameter must
    //be retrieved from the message context because it's value can vary on a
    //per service basis.
    Parameter disableParam = msgContext.getParameter(DISABLE_ADDRESSING_FOR_IN_MESSAGES);
    Object disableProperty = msgContext.getProperty(DISABLE_ADDRESSING_FOR_IN_MESSAGES);
    String value = Utils.getParameterValue(disableParam);
    if (JavaUtils.isTrueExplicitly(value)) {
        if (LoggingControl.debugLoggingAllowed && log.isDebugEnabled()) {
            log.debug(
                    "The AddressingInHandler has been disabled. No further processing will take place.");
        }
        return false;         
    } else if (JavaUtils.isTrueExplicitly(disableProperty)) {
        if (LoggingControl.debugLoggingAllowed && log.isDebugEnabled()) {
            log.debug(
                    "The AddressingInHandler has been disabled. No further processing will take place.");
        }
        return false;
    }

    // if there are not headers put a flag to disable addressing temporary
    SOAPHeader header = msgContext.getEnvelope().getHeader();
    return header != null;
}
 
开发者ID:wso2,项目名称:wso2-axis2,代码行数:30,代码来源:AddressingInHandler.java

示例9: isDiscoverable

import org.apache.axis2.util.JavaUtils; //导入方法依赖的package包/类
private boolean isDiscoverable(AxisService service) {
    boolean isAdminService = JavaUtils.isTrueExplicitly(
            service.getParameterValue("adminService"));
    boolean isHiddenService = JavaUtils.isTrueExplicitly(
            service.getParameterValue("hiddenService"));
    boolean isUndiscoverableService = JavaUtils.isTrueExplicitly(
            service.getParameterValue(DiscoveryConstants.UNDISCOVERABLE_SERVICE));

    // do not sent the notifications for either hidden or admin services
    if (isAdminService || isHiddenService ||
            isUndiscoverableService || service.isClientSide()){
        return false;
    }
    return true;
}
 
开发者ID:wso2,项目名称:carbon-commons,代码行数:16,代码来源:MessageSender.java

示例10: addServiceGroup

import org.apache.axis2.util.JavaUtils; //导入方法依赖的package包/类
public static void addServiceGroup(AxisServiceGroup serviceGroup,
                                   ArrayList serviceList,
                                   URL serviceLocation,
                                   DeploymentFileData currentDeploymentFile,
                                   AxisConfiguration axisConfiguration) throws AxisFault {

    if (isServiceGroupReadyToDeploy(serviceGroup, serviceList, serviceLocation,
            currentDeploymentFile, axisConfiguration)) {

        fillServiceGroup(serviceGroup, serviceList, serviceLocation, axisConfiguration);
        axisConfiguration.addServiceGroup(serviceGroup);

        if (currentDeploymentFile != null) {
            addAsWebResources(currentDeploymentFile.getFile(),
                    serviceGroup.getServiceGroupName(), serviceGroup);
            // let the system have hidden services
            if (!JavaUtils.isTrueExplicitly(serviceGroup.getParameterValue(
                    Constants.HIDDEN_SERVICE_PARAM_NAME))) {
                log.info(Messages.getMessage(DeploymentErrorMsgs.DEPLOYING_WS,
                        currentDeploymentFile.getName(),
                        serviceLocation.toString()));
            }
        } else if (!JavaUtils.isTrueExplicitly(serviceGroup.getParameterValue(
                        Constants.HIDDEN_SERVICE_PARAM_NAME))) {
            log.info(Messages.getMessage(DeploymentErrorMsgs.DEPLOYING_WS,
                    serviceGroup.getServiceGroupName(), ""));
        }

    }
}
 
开发者ID:wso2,项目名称:wso2-axis2,代码行数:31,代码来源:DeploymentEngine.java

示例11: doWriteMTOM

import org.apache.axis2.util.JavaUtils; //导入方法依赖的package包/类
/**
 * <p>
 * Checks whether MTOM needs to be enabled for the message represented by
 * the msgContext. We check value assigned to the "enableMTOM" property
 * either using the config files (axis2.xml, services.xml) or
 * programatically. Programatic configuration is given priority. If the
 * given value is "optional", MTOM will be enabled only if the incoming
 * message was an MTOM message.
 * </p>
 *
 * @param msgContext the active MessageContext
 * @return true if SwA needs to be enabled
 */
public static boolean doWriteMTOM(MessageContext msgContext) {
    boolean enableMTOM;
    Object enableMTOMObject = null;
    // First check the whether MTOM is enabled by the configuration
    // (Eg:Axis2.xml, services.xml)
    Parameter parameter = msgContext.getParameter(Constants.Configuration.ENABLE_MTOM);
    if (parameter != null) {
        enableMTOMObject = parameter.getValue();
    }
    // Check whether the configuration is overridden programatically..
    // Priority given to programatically setting of the value
    Object property = msgContext.getProperty(Constants.Configuration.ENABLE_MTOM);
    if (property != null) {
        enableMTOMObject = property;
    }
    enableMTOM = JavaUtils.isTrueExplicitly(enableMTOMObject);
    // Handle the optional value for enableMTOM
    // If the value for 'enableMTOM' is given as optional and if the request
    // message was a MTOM message we sent out MTOM
    if (!enableMTOM && msgContext.isDoingMTOM() && (enableMTOMObject instanceof String)) {
        if (((String) enableMTOMObject).equalsIgnoreCase(Constants.VALUE_OPTIONAL)) {
            //In server side, we check whether request was MTOM
            if (msgContext.isServerSide()) {
                if (msgContext.isDoingMTOM()) {
                    enableMTOM = true;
                }
                // in the client side, we enable MTOM if it is optional
            } else {
                enableMTOM = true;
            }
        }
    }
    return enableMTOM;
}
 
开发者ID:wso2,项目名称:wso2-axis2,代码行数:48,代码来源:TransportUtils.java

示例12: doWriteSwA

import org.apache.axis2.util.JavaUtils; //导入方法依赖的package包/类
/**
 * <p>
 * Checks whether SOAP With Attachments (SwA) needs to be enabled for the
 * message represented by the msgContext. We check value assigned to the
 * "enableSwA" property either using the config files (axis2.xml,
 * services.xml) or programatically. Programatic configuration is given
 * priority. If the given value is "optional", SwA will be enabled only if
 * the incoming message was SwA type.
 * </p>
 *
 * @param msgContext the active MessageContext
 * @return true if SwA needs to be enabled
 */
public static boolean doWriteSwA(MessageContext msgContext) {
    boolean enableSwA;
    Object enableSwAObject = null;
    // First check the whether SwA is enabled by the configuration
    // (Eg:Axis2.xml, services.xml)
    Parameter parameter = msgContext.getParameter(Constants.Configuration.ENABLE_SWA);
    if (parameter != null) {
        enableSwAObject = parameter.getValue();
    }
    // Check whether the configuration is overridden programatically..
    // Priority given to programatically setting of the value
    Object property = msgContext.getProperty(Constants.Configuration.ENABLE_SWA);
    if (property != null) {
        enableSwAObject = property;
    }
    enableSwA = JavaUtils.isTrueExplicitly(enableSwAObject);
    // Handle the optional value for enableSwA
    // If the value for 'enableSwA' is given as optional and if the request
    // message was a SwA message we sent out SwA
    if (!enableSwA && msgContext.isDoingSwA() && (enableSwAObject instanceof String)) {
        if (((String) enableSwAObject).equalsIgnoreCase(Constants.VALUE_OPTIONAL)) {
            enableSwA = true;
        }
    }
    return enableSwA;
}
 
开发者ID:wso2,项目名称:wso2-axis2,代码行数:40,代码来源:TransportUtils.java

示例13: isAnonymousTypesDisallowed

import org.apache.axis2.util.JavaUtils; //导入方法依赖的package包/类
private boolean isAnonymousTypesDisallowed() {
    boolean disallowAnonTypes = false;
    Parameter param = service.getParameter(Java2WSDLConstants.DISALLOW_ANON_TYPES_OPTION_LONG);
    if (param != null) {
        disallowAnonTypes = JavaUtils.isTrueExplicitly(param.getValue());
    }
    return disallowAnonTypes;
}
 
开发者ID:wso2,项目名称:wso2-axis2,代码行数:9,代码来源:DefaultSchemaGenerator.java

示例14: parseAuthorizationContextTokenGeneratorConfig

import org.apache.axis2.util.JavaUtils; //导入方法依赖的package包/类
private void parseAuthorizationContextTokenGeneratorConfig(OMElement oauthConfigElem) {
    OMElement authContextTokGenConfigElem =
            oauthConfigElem.getFirstChildWithName(getQNameWithIdentityNS(ConfigElements.AUTHORIZATION_CONTEXT_TOKEN_GENERATION));
    if (authContextTokGenConfigElem != null) {
        OMElement enableJWTGenerationConfigElem =
                authContextTokGenConfigElem.getFirstChildWithName(getQNameWithIdentityNS(ConfigElements.ENABLED));
        if (enableJWTGenerationConfigElem != null) {
            String enableJWTGeneration = enableJWTGenerationConfigElem.getText().trim();
            if (enableJWTGeneration != null && JavaUtils.isTrueExplicitly(enableJWTGeneration)) {
                isAuthContextTokGenEnabled = true;
                if (authContextTokGenConfigElem.getFirstChildWithName(getQNameWithIdentityNS(ConfigElements.TOKEN_GENERATOR_IMPL_CLASS)) != null) {
                    tokenGeneratorImplClass =
                            authContextTokGenConfigElem.getFirstChildWithName(getQNameWithIdentityNS(ConfigElements.TOKEN_GENERATOR_IMPL_CLASS))
                                    .getText().trim();
                }
                if (authContextTokGenConfigElem.getFirstChildWithName(getQNameWithIdentityNS(ConfigElements.CLAIMS_RETRIEVER_IMPL_CLASS)) != null) {
                    claimsRetrieverImplClass =
                            authContextTokGenConfigElem.getFirstChildWithName(getQNameWithIdentityNS(ConfigElements.CLAIMS_RETRIEVER_IMPL_CLASS))
                                    .getText().trim();
                }
                if (authContextTokGenConfigElem.getFirstChildWithName(getQNameWithIdentityNS(ConfigElements.CONSUMER_DIALECT_URI)) != null) {
                    consumerDialectURI =
                            authContextTokGenConfigElem.getFirstChildWithName(getQNameWithIdentityNS(ConfigElements.CONSUMER_DIALECT_URI))
                                    .getText().trim();
                }
                if (authContextTokGenConfigElem.getFirstChildWithName(getQNameWithIdentityNS(ConfigElements.SIGNATURE_ALGORITHM)) != null) {
                    signatureAlgorithm =
                            authContextTokGenConfigElem.getFirstChildWithName(getQNameWithIdentityNS(ConfigElements.SIGNATURE_ALGORITHM))
                                    .getText().trim();
                }
                if (authContextTokGenConfigElem.getFirstChildWithName(getQNameWithIdentityNS(ConfigElements.SECURITY_CONTEXT_TTL)) != null) {
                    authContextTTL =
                            authContextTokGenConfigElem.getFirstChildWithName(getQNameWithIdentityNS(ConfigElements.SECURITY_CONTEXT_TTL))
                                    .getText().trim();
                }
            }
        }
    }
    if (log.isDebugEnabled()) {
        if (isAuthContextTokGenEnabled) {
            log.debug("JWT Generation is enabled");
        } else {
            log.debug("JWT Generation is disabled");
        }
    }
}
 
开发者ID:wso2-attic,项目名称:carbon-identity,代码行数:47,代码来源:OAuthServerConfiguration.java

示例15: getOptionalParamBoolean

import org.apache.axis2.util.JavaUtils; //导入方法依赖的package包/类
public static boolean getOptionalParamBoolean(ParameterInclude paramInclude, String paramName, boolean defaultValue) throws AxisFault {
    Parameter param = paramInclude.getParameter(paramName);
    return param == null ? defaultValue : JavaUtils.isTrueExplicitly(param.getValue(), defaultValue);
}
 
开发者ID:wso2,项目名称:wso2-axis2-transports,代码行数:5,代码来源:ParamUtils.java


注:本文中的org.apache.axis2.util.JavaUtils.isTrueExplicitly方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。