/** * Set the entity protocol. * * @param protocol The protocol to set. */ public void setProtocol(String protocol) { entityProtocol = DatatypeHelper.safeTrimOrNullString(protocol); }
/** * Constructor. * * @param uri the URI of the namespace * @param prefix the prefix of the namespace */ public Namespace(String uri, String prefix) { namespaceURI = DatatypeHelper.safeTrimOrNullString(uri); namespacePrefix = DatatypeHelper.safeTrimOrNullString(prefix); nsStr = null; }
/** * Sets the host name of the HTTP proxy server through which connections will be made. * * @param host host name of the HTTP proxy server through which connections will be made */ public void setProxyHost(String host) { proxyHost = DatatypeHelper.safeTrimOrNullString(host); }
/** * Sets the password used to connect to the HTTP proxy server. * * @param password password used to connect to the HTTP proxy server */ public void setProxyPassword(String password) { proxyPassword = DatatypeHelper.safeTrimOrNullString(password); }
/** * Constructor. * * @param type expected content type * @param method expected request method * @param secured whether the request must be secured */ public HTTPRule(String type, String method, boolean secured) { requiredContentType = DatatypeHelper.safeTrimOrNullString(type); requiredRequestMethod = DatatypeHelper.safeTrimOrNullString(method); requireSecured = secured; }
/** * Sets the ID of the entity this credential is for. * * @param id ID of the entity this credential is for */ public void setEntityId(String id) { entityID = DatatypeHelper.safeTrimOrNullString(id); }
/** {@inheritDoc} */ protected void processElementContent(XMLObject xmlObject, String elementContent) { ResourceContentType resourceContent = (ResourceContentType) xmlObject; resourceContent.setValue(DatatypeHelper.safeTrimOrNullString(elementContent)); } }
/** {@inheritDoc} */ protected void processElementContent(XMLObject xmlObject, String elementContent) { AttributeValueType attributeValue = (AttributeValueType) xmlObject; attributeValue.setValue(DatatypeHelper.safeTrimOrNullString(elementContent)); } }
/** * Get the Java security JCA/JCE algorithm identifier associated with an algorithm URI. * * @param algorithmURI the algorithm URI to evaluate * @return the Java algorithm identifier, or null if the mapping is unavailable or indeterminable from the URI */ public static String getAlgorithmIDFromURI(String algorithmURI) { return DatatypeHelper.safeTrimOrNullString(JCEMapper.translateURItoJCEID(algorithmURI)); }
/** * Set the key algorithm criteria. * * @param algorithm The keyAlgorithm to set. */ public void setKeyAlgorithm(String algorithm) { if (DatatypeHelper.isEmpty(algorithm)) { throw new IllegalArgumentException("Key algorithm criteria value must be supplied"); } keyAlgorithm = DatatypeHelper.safeTrimOrNullString(algorithm); }
/** {@inheritDoc} */ protected void doParse(Element element, ParserContext parserContext, BeanDefinitionBuilder builder) { super.doParse(element, parserContext, builder); String namespace = "urn:oasis:names:tc:SAML:1.0:nameid-format:unspecified"; if (element.hasAttributeNS(null, "nameFormat")) { namespace = DatatypeHelper.safeTrimOrNullString(element.getAttributeNS(null, "nameFormat")); } builder.addPropertyValue("nameFormat", namespace); builder.addPropertyValue("nameQualifier", element.getAttributeNS(null, "nameQualifier")); } }
/** {@inheritDoc} */ protected void processAttribute(XMLObject xmlObject, Attr attribute) throws UnmarshallingException { if(attribute.getLocalName().equals(RuleCombinerParametersType.RULE_ID_REF_ATTRIB_NAME)){ RuleCombinerParametersType ruleCombinerParametersType = (RuleCombinerParametersType)xmlObject; ruleCombinerParametersType.setRuleIdRef(DatatypeHelper.safeTrimOrNullString(attribute.getValue())); } else { super.processAttribute(xmlObject, attribute); } }
/** {@inheritDoc} */ protected void processAttribute(XMLObject xmlObject, Attr attribute) throws UnmarshallingException { if (attribute.getLocalName().equals(ApplyType.FUNCTION_ID_ATTRIB_NAME)) { ApplyType applyType = (ApplyType) xmlObject; applyType.setFunctionId(DatatypeHelper.safeTrimOrNullString(attribute.getValue())); } else { super.processAttribute(xmlObject, attribute); } }
/** {@inheritDoc} */ protected void processAttribute(XMLObject samlObject, Attr attribute) throws UnmarshallingException { AttributeAssignmentType attrib = (AttributeAssignmentType) samlObject; if (attribute.getLocalName().equals(AttributeAssignmentType.ATTR_ID_ATTRIB_NAME)) { attrib.setAttributeId(DatatypeHelper.safeTrimOrNullString(attribute.getValue())); } else{ super.processAttribute(samlObject, attribute); } }
/** {@inheritDoc} */ protected void processAttribute(XMLObject xmlObject, Attr attribute) throws UnmarshallingException { if (attribute.getLocalName().equals(EnvironmentMatchType.MATCH_ID_ATTRIB_NAME)) { EnvironmentMatchType matchType = (EnvironmentMatchType) xmlObject; matchType.setMatchId(DatatypeHelper.safeTrimOrNullString(attribute.getValue())); } else { super.processAttribute(xmlObject, attribute); } }
/** {@inheritDoc} */ protected void processAttribute(XMLObject xmlObject, Attr attribute) throws UnmarshallingException { if (attribute.getLocalName().equals(ResourceMatchType.MATCH_ID_ATTRIB_NAME)) { ResourceMatchType matchType = (ResourceMatchType) xmlObject; matchType.setMatchId(DatatypeHelper.safeTrimOrNullString(attribute.getValue())); } else { super.processAttribute(xmlObject, attribute); } }
/** {@inheritDoc} */ protected void processAttribute(XMLObject xmlObject, Attr attribute) throws UnmarshallingException { CombinerParameterType combinerParameterType = (CombinerParameterType) xmlObject; if(attribute.getLocalName().equals(CombinerParameterType.PARAMETER_NAMEATTRIB_NAME)){ combinerParameterType.setParameterName(DatatypeHelper.safeTrimOrNullString(attribute.getValue())); } else { super.processAttribute(xmlObject, attribute); } }
/** {@inheritDoc} */ protected void processAttribute(XMLObject xmlObject, Attr attribute) throws UnmarshallingException { if(attribute.getLocalName().equals(VariableDefinitionType.VARIABLE_ID_ATTRIB_NAME)){ VariableDefinitionType variableDefinitionType = (VariableDefinitionType) xmlObject; variableDefinitionType.setVariableId(DatatypeHelper.safeTrimOrNullString(attribute.getValue())); } else { super.processAttribute(xmlObject, attribute); } }
/** {@inheritDoc} */ protected void processAttribute(XMLObject xmlObject, Attr attribute) throws UnmarshallingException { if(attribute.getLocalName().equals(VariableReferenceType.VARIABLE_ID_ATTRIB_NAME)){ VariableReferenceType variableReferenceType = (VariableReferenceType) xmlObject; variableReferenceType.setVariableId(DatatypeHelper.safeTrimOrNullString(attribute.getValue())); } else { super.processAttribute(xmlObject, attribute); } }
/** {@inheritDoc} */ protected void processAttribute(XMLObject xmlObject, Attr attribute) throws UnmarshallingException { AttributeValueType attributeValue = (AttributeValueType) xmlObject; QName attribQName = XMLHelper.getNodeQName(attribute); if (attribute.isId()) { attributeValue.getUnknownAttributes().registerID(attribQName); } attributeValue.getUnknownAttributes().put(attribQName, attribute.getValue()); if(attribute.getLocalName().equals(AttributeValueType.DATA_TYPE_ATTRIB_NAME)){ attributeValue.setDataType(DatatypeHelper.safeTrimOrNullString(attribute.getValue())); } }