/** * Create an attribute type * * @param name Name of the attribute * @param nameFormat name format uri * @param attributeValues an object array of attribute values * @return */ public static AttributeType createAttribute(String name, String nameFormat, Object... attributeValues) { AttributeType att = new AttributeType(name); att.setNameFormat(nameFormat); if (attributeValues != null && attributeValues.length > 0) { for (Object attributeValue : attributeValues) { att.addAttributeValue(attributeValue); } } return att; }
/** * Create an AttributeStatement given an attribute * @param attributeValue * @return */ public static AttributeStatementType createAttributeStatement(String attributeValue) { AttributeStatementType attribStatement = new AttributeStatementType(); AttributeType att = new AttributeType( attributeValue ); att.addAttributeValue(attributeValue); attribStatement.addAttribute( new ASTChoiceType( att )); return attribStatement; }
/** * Create an AttributeStatement given an attribute * * @param attributeValue * @return */ public static AttributeStatementType createAttributeStatement(String attributeValue) { AttributeStatementType attribStatement = new AttributeStatementType(); AttributeType att = new AttributeType(attributeValue); att.addAttributeValue(attributeValue); attribStatement.addAttribute(new ASTChoiceType(att)); return attribStatement; }
/** * Create an AttributeStatement given an attribute * @param attributeValue * @return */ public static AttributeStatementType createAttributeStatement(String attributeValue) { AttributeStatementType attribStatement = new AttributeStatementType(); AttributeType att = new AttributeType( attributeValue ); att.addAttributeValue(attributeValue); attribStatement.addAttribute( new ASTChoiceType( att )); return attribStatement; }
/** * Create an attribute type given a role name * * @param roleName * @return */ public static AttributeType createAttributeForRole(String roleName) { AttributeType att = new AttributeType("role"); att.setFriendlyName("role"); att.setNameFormat(JBossSAMLURIConstants.ATTRIBUTE_FORMAT_BASIC.get()); // rolename att.addAttributeValue(roleName); return att; }
/** * Create an AttributeStatement given an attribute * * @param attributeValue * * @return */ public static AttributeStatementType createAttributeStatement(String attributeValue) { AttributeStatementType attribStatement = new AttributeStatementType(); AttributeType att = new AttributeType(attributeValue); att.addAttributeValue(attributeValue); attribStatement.addAttribute(new ASTChoiceType(att)); return attribStatement; }
/** * Given an attribute type and a value, create {@link AttributeStatementType} * @param key attribute type * @param value attribute value * @return */ public static AttributeStatementType createAttributeStatement(String key, String value) { AttributeStatementType attrStatement = new AttributeStatementType(); AttributeType attr = new AttributeType(key); attr.addAttributeValue(value); attrStatement.addAttribute(new ASTChoiceType(attr)); return attrStatement; }
/** * Create an AttributeStatement given an attribute * * @param attributeValue * * @return */ public static AttributeStatementType createAttributeStatement(String attributeValue) { AttributeStatementType attribStatement = new AttributeStatementType(); AttributeType att = new AttributeType(attributeValue); att.addAttributeValue(attributeValue); attribStatement.addAttribute(new ASTChoiceType(att)); return attribStatement; }
/** * Create an attribute type given a role name * @param roleName * @return */ public static AttributeType createAttributeForRole(String roleName) { AttributeType att = new AttributeType( "role" ); att.setFriendlyName("role"); att.setNameFormat(JBossSAMLURIConstants.ATTRIBUTE_FORMAT_BASIC.get()); //rolename att.addAttributeValue( roleName ); return att; }
/** * Create an attribute type given a role name * @param roleName * @return */ public static AttributeType createAttributeForRole(String roleName) { AttributeType att = new AttributeType( "role" ); att.setFriendlyName("role"); att.setNameFormat(JBossSAMLURIConstants.ATTRIBUTE_FORMAT_BASIC.get()); //rolename att.addAttributeValue( roleName ); return att; }
/** * Given an attribute type and a value, create {@link AttributeStatementType} * * @param key attribute type * @param value attribute value * @return */ public static AttributeStatementType createAttributeStatement(String key, String value) { AttributeStatementType attrStatement = new AttributeStatementType(); AttributeType attr = new AttributeType(key); attr.addAttributeValue(value); attrStatement.addAttribute(new ASTChoiceType(attr)); return attrStatement; }
/** * Given an attribute type and a value, create {@link AttributeStatementType} * @param key attribute type * @param value attribute value * @return */ public static AttributeStatementType createAttributeStatement(String key, String value) { AttributeStatementType attrStatement = new AttributeStatementType(); AttributeType attr = new AttributeType(key); attr.addAttributeValue(value); attrStatement.addAttribute(new ASTChoiceType(attr)); return attrStatement; }
/** * Given an attribute type and a value, create {@link AttributeStatementType} * * @param key attribute type * @param value attribute value * * @return */ public static AttributeStatementType createAttributeStatement(String key, String value) { AttributeStatementType attrStatement = new AttributeStatementType(); AttributeType attr = new AttributeType(key); attr.addAttributeValue(value); attrStatement.addAttribute(new ASTChoiceType(attr)); return attrStatement; }
/** * Create an attribute type given a role name * * @param roleName * * @return */ public static AttributeType createAttributeForRole(String roleName) { AttributeType att = new AttributeType("role"); att.setFriendlyName("role"); att.setNameFormat(JBossSAMLURIConstants.ATTRIBUTE_FORMAT_BASIC.get()); // rolename att.addAttributeValue(roleName); return att; }
/** * Given an attribute type and a value, create {@link AttributeStatementType} * * @param key attribute type * @param value attribute value * * @return */ public static AttributeStatementType createAttributeStatement(String key, String value) { AttributeStatementType attrStatement = new AttributeStatementType(); AttributeType attr = new AttributeType(key); attr.addAttributeValue(value); attrStatement.addAttribute(new ASTChoiceType(attr)); return attrStatement; }
/** * Given a set of roles, create an attribute statement * @param roles * @return */ public static AttributeStatementType createAttributeStatement(List<String> roles) { AttributeStatementType attrStatement = new AttributeStatementType(); for (String role : roles) { AttributeType attr = new AttributeType("Role"); attr.addAttributeValue(role); attrStatement.addAttribute(new ASTChoiceType(attr)); } return attrStatement; }
/** * Create an attribute type given a role name * * @param roleName * * @return */ public static AttributeType createAttributeForRole(String roleName) { AttributeType att = new AttributeType("role"); att.setFriendlyName("role"); att.setNameFormat(JBossSAMLURIConstants.ATTRIBUTE_FORMAT_BASIC.get()); // rolename att.addAttributeValue(roleName); return att; }
/** * Given a set of roles, create an attribute statement * @param roles * @return */ public static AttributeStatementType createAttributeStatement(List<String> roles) { AttributeStatementType attrStatement = new AttributeStatementType(); for (String role : roles) { AttributeType attr = new AttributeType("Role"); attr.addAttributeValue(role); attrStatement.addAttribute(new ASTChoiceType(attr)); } return attrStatement; }
/** * Given a set of roles, create an attribute statement * * @param roles * * @return */ public static AttributeStatementType createAttributeStatement(List<String> roles) { AttributeStatementType attrStatement = null; for (String role : roles) { if (attrStatement == null) { attrStatement = new AttributeStatementType(); } AttributeType attr = new AttributeType(AttributeConstants.ROLE_IDENTIFIER_ASSERTION); attr.addAttributeValue(role); attrStatement.addAttribute(new ASTChoiceType(attr)); } return attrStatement; }
/** * Given a set of roles, create an attribute statement * * @param roles * @return */ public static AttributeStatementType createAttributeStatement(List<String> roles) { AttributeStatementType attrStatement = null; for (String role : roles) { if(attrStatement == null){ attrStatement = new AttributeStatementType(); } AttributeType attr = new AttributeType(AttributeConstants.ROLE_IDENTIFIER_ASSERTION); attr.addAttributeValue(role); attrStatement.addAttribute(new ASTChoiceType(attr)); } return attrStatement; }