Examples of ActionMatchType


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

      permitRule.setEffect(EffectType.PERMIT);

      ActionsType permitRuleActionsType = new ActionsType();
      ActionType permitRuleActionType = new ActionType();

      ActionMatchType amct = new ActionMatchType();
      amct.setMatchId("urn:oasis:names:tc:xacml:1.0:function:string-equal");
      amct.setAttributeValue(PolicyAttributeFactory.createStringAttributeType("read"));
      amct.setActionAttributeDesignator(PolicyAttributeFactory.createAttributeDesignatorType(
            XACMLConstants.ATTRIBUTEID_ACTION_ID, XMLSchemaConstants.DATATYPE_STRING, null, false));
      permitRuleActionType.getActionMatch().add(amct);
      TargetType permitRuleTargetType = new TargetType();
      permitRuleActionsType.getAction().add(permitRuleActionType);
      permitRuleTargetType.setActions(permitRuleActionsType);
View Full Code Here

Examples of org.opensaml.xacml.policy.ActionMatchType

    }

    /** {@inheritDoc} */
    protected void processAttribute(XMLObject xmlObject, Attr attribute) throws UnmarshallingException {
        if (attribute.getLocalName().equals(ActionMatchType.MATCH_ID_ATTRIB_NAME)) {
            ActionMatchType matchType = (ActionMatchType) xmlObject;
            matchType.setMatchId(DatatypeHelper.safeTrimOrNullString(attribute.getValue()));
        } else {
            super.processAttribute(xmlObject, attribute);
        }
    }
View Full Code Here

Examples of org.opensaml.xacml.policy.ActionMatchType

    }

    /** {@inheritDoc} */
    protected void processChildElement(XMLObject parentXMLObject, XMLObject childXMLObject)
            throws UnmarshallingException {
        ActionMatchType matchType = (ActionMatchType) parentXMLObject;
     
        if (childXMLObject instanceof AttributeValueType) {
            matchType.setAttributeValue((AttributeValueType) childXMLObject);
        } else if (childXMLObject instanceof AttributeDesignatorType) {
            matchType.setActionAttributeDesignator((AttributeDesignatorType) childXMLObject);
        } else if (childXMLObject instanceof AttributeSelectorType) {
            matchType.setAttributeSelector((AttributeSelectorType) childXMLObject);
        } else {
            super.processChildElement(parentXMLObject, childXMLObject);
        }
    }
View Full Code Here

Examples of org.opensaml.xacml.policy.ActionMatchType

        super();
    }

    /** {@inheritDoc} */
    protected void marshallAttributes(XMLObject xmlObject, Element domElement) throws MarshallingException {
        ActionMatchType matchType = (ActionMatchType) xmlObject;

        if (!DatatypeHelper.isEmpty(matchType.getMatchId())) {
            domElement.setAttribute(ActionMatchType.MATCH_ID_ATTRIB_NAME, matchType.getMatchId());
        }
    }
View Full Code Here

Examples of org.opensaml.xacml.policy.ActionMatchType

       
        if (attribute == null) {
            return null;
        }
       
        ActionMatchType actionMatch = build();
       
        AttributeDesignatorType designator = AttributeDesignatorHelper.build(
                AttributeDesignatorType.ACTION_ATTRIBUTE_DESIGNATOR_ELEMENT_NAME, attribute);
       
        String attributeDataType =  (matchFunctionDatatype == null ?attribute.getDataType() : matchFunctionDatatype);
       
        AttributeValueType policyAttributeValue = PolicyAttributeValueHelper.build(attributeDataType, CtxAttributeTypeHelper.getFirstValue(attribute));
       
        actionMatch.setActionAttributeDesignator(designator);
        actionMatch.setAttributeValue(policyAttributeValue);
        actionMatch.setMatchId(matchFunctionId);
       
        return actionMatch;
    }
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.