Package org.opensaml.xacml.policy

Examples of org.opensaml.xacml.policy.IdReferenceType


       super();
    }
   
    /** {@inheritDoc} */
    protected void marshallAttributes(XMLObject xmlObject, Element domElement) throws MarshallingException {
        IdReferenceType idReferenceType = (IdReferenceType)xmlObject;
       
        if(!DatatypeHelper.isEmpty(idReferenceType.getEarliestVersion())){
            domElement.setAttribute(IdReferenceType.EARLIEST_VERSION_ATTRIB_NAME,
                    idReferenceType.getEarliestVersion());
        }
        if(!DatatypeHelper.isEmpty(idReferenceType.getLatestVersion())){
            domElement.setAttribute(IdReferenceType.LATEST_VERSION_ATTRIB_NAME,
                    idReferenceType.getLatestVersion());
        }
        if(!DatatypeHelper.isEmpty(idReferenceType.getVersion())){
            domElement.setAttribute(IdReferenceType.VERSION_ATTRIB_NAME,
                    idReferenceType.getVersion());
        }
    }
View Full Code Here


       super();
    }
   
    /** {@inheritDoc} */
    protected void marshallAttributes(XMLObject xmlObject, Element domElement) throws MarshallingException {
        IdReferenceType idReferenceType = (IdReferenceType)xmlObject;
       
        if(!DatatypeHelper.isEmpty(idReferenceType.getEarliestVersion())){
            domElement.setAttribute(IdReferenceType.EARLIEST_VERSION_ATTRIB_NAME,
                    idReferenceType.getEarliestVersion());
        }else if(!DatatypeHelper.isEmpty(idReferenceType.getLatestVersion())){
            domElement.setAttribute(IdReferenceType.LATEST_VERSION_ATTRIB_NAME,
                    idReferenceType.getLatestVersion());
        }else if(!DatatypeHelper.isEmpty(idReferenceType.getVersion())){
            domElement.setAttribute(IdReferenceType.VERSION_ATTRIB_NAME,
                    idReferenceType.getVersion());
        }
    }
View Full Code Here

    }
   
   
    /** {@inheritDoc} */
    protected void processAttribute(XMLObject xmlObject, Attr attribute) throws UnmarshallingException {
        IdReferenceType idReferenceType = (IdReferenceType)xmlObject;
    
        if(attribute.getLocalName().equals(IdReferenceType.EARLIEST_VERSION_ATTRIB_NAME)){          
            idReferenceType.setEarliestVersion(DatatypeHelper.safeTrimOrNullString(attribute.getValue()));
        }else if(attribute.getLocalName().equals(IdReferenceType.LATEST_VERSION_ATTRIB_NAME)){          
            idReferenceType.setLatestVersion(DatatypeHelper.safeTrimOrNullString(attribute.getValue()));
        }else if(attribute.getLocalName().equals(IdReferenceType.VERSION_ATTRIB_NAME)){          
            idReferenceType.setVersion(DatatypeHelper.safeTrimOrNullString(attribute.getValue()));
        } else {
            super.processAttribute(xmlObject, attribute);
        }
    }
View Full Code Here

        return false;
    }

    public static boolean deletePolicyReference(PolicySetType policySet, String policyId) {
        List<IdReferenceType> policyRefList = policySet.getPolicyIdReferences();
        IdReferenceType idReference = null;
        for (IdReferenceType policyRef : policyRefList) {
            if (policyRef.getValue().equals(policyId)) {
                idReference = policyRef;
                break;
            }
View Full Code Here

        return false;
    }

    public static boolean deletePolicySetReference(PolicySetType policySet, String policySetId) {
        List<IdReferenceType> psRefList = policySet.getPolicySetIdReferences();
        IdReferenceType idReference = null;
        for (IdReferenceType psRef : psRefList) {
            if (psRef.getValue().equals(policySetId)) {
                idReference = psRef;
                break;
            }
View Full Code Here

    private static final javax.xml.namespace.QName policyIdSetReferenceQName = IdReferenceType.POLICY_SET_ID_REFERENCE_ELEMENT_NAME;

    private IdReferenceHelper() {}

    public static IdReferenceType build(Type type, String value) {
        IdReferenceType idReference;
        if (type == Type.POLICYSET_ID_REFERENCE) {
            idReference = (IdReferenceType) builderFactory.getBuilder(policyIdSetReferenceQName)
                    .buildObject(policyIdSetReferenceQName);
        } else {
            idReference = (IdReferenceType) builderFactory.getBuilder(policyIdReferenceQName)
                    .buildObject(policyIdReferenceQName);
        }
        idReference.setValue(value);
        return idReference;
    }
View Full Code Here

TOP

Related Classes of org.opensaml.xacml.policy.IdReferenceType

Copyright © 2018 www.massapicom. 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.