Examples of AttributeDesignatorType


Examples of org.jboss.security.xacml.core.model.policy.AttributeDesignatorType

   }

   public static AttributeDesignatorType createAttributeDesignatorType(String id, String dataType, String issuer,
         boolean mustBePresent)
   {
      AttributeDesignatorType adt = new AttributeDesignatorType();
      adt.setAttributeId(id);
      adt.setDataType(dataType);
      if (issuer != null)
         adt.setIssuer(issuer);
      adt.setMustBePresent(mustBePresent);
      return adt;
   }
View Full Code Here

Examples of org.jboss.security.xacml.core.model.policy.AttributeDesignatorType

public class PolicyAttributeFactoryTestCase extends TestCase
{

   public void testCreateAttributeDesignatorType1() throws Exception
   {
      AttributeDesignatorType adt = PolicyAttributeFactory.createAttributeDesignatorType(
            XACMLConstants.ATTRIBUTEID_ACTION_ID, XMLSchemaConstants.DATATYPE_STRING, null, false);
      assertEquals("AttributeId?", XACMLConstants.ATTRIBUTEID_ACTION_ID, adt.getAttributeId());
      assertEquals("DataType?", XMLSchemaConstants.DATATYPE_STRING, adt.getDataType());
      assertEquals("MustBePresent?", false, adt.isMustBePresent());
      assertNull("Issuer?", adt.getIssuer());
   }
View Full Code Here

Examples of org.jboss.security.xacml.core.model.policy.AttributeDesignatorType

      assertNull("Issuer?", adt.getIssuer());
   }

   public void testCreateAttributeDesignatorType2() throws Exception
   {
      AttributeDesignatorType adt = PolicyAttributeFactory.createAttributeDesignatorType(
            XACMLConstants.ATTRIBUTEID_CURRENT_DATE, XMLSchemaConstants.DATATYPE_DATE, "org.jboss", true);
      assertEquals("AttributeId?", XACMLConstants.ATTRIBUTEID_CURRENT_DATE, adt.getAttributeId());
      assertEquals("DataType?", XMLSchemaConstants.DATATYPE_DATE, adt.getDataType());
      assertEquals("MustBePresent?", true, adt.isMustBePresent());
      assertEquals("Issuer?", "org.jboss", adt.getIssuer());
   }
View Full Code Here

Examples of org.jboss.security.xacml.core.model.policy.AttributeDesignatorType

   }

   public static AttributeDesignatorType createAttributeDesignatorType(String id, String dataType, String issuer,
         boolean mustBePresent)
   {
      AttributeDesignatorType adt = new AttributeDesignatorType();
      adt.setAttributeId(id);
      adt.setDataType(dataType);
      if (issuer != null)
         adt.setIssuer(issuer);
      adt.setMustBePresent(mustBePresent);
      return adt;
   }
View Full Code Here

Examples of org.jboss.security.xacml.core.model.policy.AttributeDesignatorType

      return getBareAttributeValueType(value, "urn:oasis:names:tc:xacml:1.0:data-type:x500Name");
   }
  
   public static AttributeDesignatorType createAttributeDesignatorType(String id, String dataType)
   {
      AttributeDesignatorType adt = new AttributeDesignatorType();
      adt.setAttributeId(id);
      adt.setDataType(dataType);
      return adt;
   }
View Full Code Here

Examples of org.opensaml.xacml.policy.AttributeDesignatorType

        attributeValue = prepareForAssignment(attributeValue, value);
    }

    /** {@inheritDoc} */
    public void setEnvironmentAttributeDesignator(AttributeDesignatorType attribute) {
        AttributeDesignatorType currentDesignator = getEnvironmentAttributeDesignator();
        if (currentDesignator != null) {
            attributeChoice.remove(currentDesignator);
        }

        attributeChoice.add(attribute);
View Full Code Here

Examples of org.opensaml.xacml.policy.AttributeDesignatorType

        attributeValue = prepareForAssignment(attributeValue, value);
    }

    /** {@inheritDoc} */
    public void setActionAttributeDesignator(AttributeDesignatorType attribute) {
        AttributeDesignatorType currentDesignator = getActionAttributeDesignator();
        if (currentDesignator != null) {
            attributeChoice.remove(currentDesignator);
        }

        attributeChoice.add(attribute);
View Full Code Here

Examples of org.opensaml.xacml.policy.AttributeDesignatorType

        attributeValue = prepareForAssignment(attributeValue, value);
    }

    /** {@inheritDoc} */
    public void setSubjectAttributeDesignator(AttributeDesignatorType attribute) {
        AttributeDesignatorType currentDesignator = getSubjectAttributeDesignator();
        if (currentDesignator != null) {
            attributeChoice.remove(currentDesignator);
        }

        attributeChoice.add(attribute);
View Full Code Here

Examples of org.opensaml.xacml.policy.AttributeDesignatorType

        attributeValue = prepareForAssignment(attributeValue, value);
    }

    /** {@inheritDoc} */
    public void setResourceAttributeDesignator(AttributeDesignatorType attribute) {
        AttributeDesignatorType currentDesignator = getResourceAttributeDesignator();
        if (currentDesignator != null) {
            attributeChoice.remove(currentDesignator);
        }

        attributeChoice.add(attribute);
View Full Code Here

Examples of org.opensaml.xacml.policy.AttributeDesignatorType

    }
   
    /** {@inheritDoc} */
    protected void processAttribute(XMLObject xmlObject, Attr attribute) throws UnmarshallingException {
       
        AttributeDesignatorType attributeDesignatorType = (AttributeDesignatorType) xmlObject;
       
        if (attribute.getLocalName().equals(AttributeDesignatorType.ATTRIBUTE_ID_ATTRIB_NAME)){
            attributeDesignatorType.setAttribtueId(DatatypeHelper.safeTrimOrNullString(attribute.getValue()));
        } else  if (attribute.getLocalName().equals(AttributeDesignatorType.DATA_TYPE_ATTRIB_NAME)){
            attributeDesignatorType.setDataType(DatatypeHelper.safeTrimOrNullString(attribute.getValue()));
        } else  if (attribute.getLocalName().equals(AttributeDesignatorType.ISSUER_ATTRIB_NAME)){
            attributeDesignatorType.setIssuer(DatatypeHelper.safeTrimOrNullString(attribute.getValue()));
        } else  if (attribute.getLocalName().equals(AttributeDesignatorType.MUST_BE_PRESENT_ATTRIB_NAME)){
            if (attribute.getValue().equals("True") || attribute.getValue().equals("true")) {
                attributeDesignatorType.setMustBePresentXSBoolean(XSBooleanValue.valueOf("1"));
            } else {
                attributeDesignatorType.setMustBePresentXSBoolean(XSBooleanValue.valueOf("0"));
            }         
        } else {
            super.processAttribute(xmlObject, attribute);
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.