Package org.opensaml.xacml.ctx

Examples of org.opensaml.xacml.ctx.ResourceType


                    null,
                    Collections.singletonList(resourceAttributeValue)
            );
        attributes.clear();
        attributes.add(resourceAttribute);
        ResourceType resource = RequestComponentBuilder.createResourceType(attributes, null);
       
        // Action
        AttributeValueType actionAttributeValue =
            RequestComponentBuilder.createAttributeValueType(
                    "execute"
View Full Code Here


       
        List<ResourceType> resources = request.getResources();
        assertNotNull(resources);
        assertEquals(1, resources.size());
       
        ResourceType resource = resources.get(0);
        assertEquals(4, resource.getAttributes().size());
       
        boolean resourceIdSatisfied = false;
        boolean soapServiceSatisfied = false;
        boolean soapOperationSatisfied = false;
        boolean resourceURISatisfied = false;
        for (AttributeType attribute : resource.getAttributes()) {
            String attributeValue = attribute.getAttributeValues().get(0).getValue();
            if (XACMLConstants.RESOURCE_ID.equals(attribute.getAttributeID())
                && "{http://www.example.org/contract/DoubleIt}DoubleItService#DoubleIt".equals(
                    attributeValue)) {
                resourceIdSatisfied = true;
View Full Code Here

       
        List<ResourceType> resources = request.getResources();
        assertNotNull(resources);
        assertEquals(1, resources.size());
       
        ResourceType resource = resources.get(0);
        assertEquals(4, resource.getAttributes().size());
       
        boolean resourceIdSatisfied = false;
        boolean soapServiceSatisfied = false;
        boolean soapOperationSatisfied = false;
        boolean resourceURISatisfied = false;
        String expectedResourceId =
            service + "#" + operation;
        for (AttributeType attribute : resource.getAttributes()) {
            String attributeValue = attribute.getAttributeValues().get(0).getValue();
            if (XACMLConstants.RESOURCE_ID.equals(attribute.getAttributeID())
                && expectedResourceId.equals(attributeValue)) {
                resourceIdSatisfied = true;
            } else if (XACMLConstants.RESOURCE_WSDL_SERVICE_ID.equals(attribute.getAttributeID())
View Full Code Here

       
        List<ResourceType> resources = request.getResources();
        assertNotNull(resources);
        assertEquals(1, resources.size());
       
        ResourceType resource = resources.get(0);
        assertEquals(1, resource.getAttributes().size());
       
        for (AttributeType attribute : resource.getAttributes()) {
            String attributeValue = attribute.getAttributeValues().get(0).getValue();
            assertEquals(attributeValue, resourceURL);
        }
    }
View Full Code Here

       
        List<ResourceType> resources = request.getResources();
        assertNotNull(resources);
        assertEquals(1, resources.size());
       
        ResourceType resource = resources.get(0);
        assertEquals(1, resource.getAttributes().size());
       
        for (AttributeType attribute : resource.getAttributes()) {
            String attributeValue = attribute.getAttributeValues().get(0).getValue();
            assertEquals(attributeValue, resourceURI);
        }
    }
View Full Code Here

        String issuer = messageParser.getIssuer();
       
        String actionToUse = messageParser.getAction(action);

        SubjectType subjectType = createSubjectType(principal, roles, issuer);
        ResourceType resourceType = createResourceType(messageParser);
        AttributeType actionAttribute = createAttribute(XACMLConstants.ACTION_ID, XACMLConstants.XS_STRING,
                                                        null, actionToUse);
        ActionType actionType = RequestComponentBuilder.createActionType(Collections.singletonList(actionAttribute));

        return RequestComponentBuilder.createRequestType(Collections.singletonList(subjectType),
View Full Code Here

                            Collections.singletonList(resourceAttributeValue)
                    );
                attributes.add(resourceAttribute);
            }
        }
        ResourceType resourceType = RequestComponentBuilder.createResourceType(attributes, null);
       
        // Action
        AttributeValueType actionAttributeValue =
            RequestComponentBuilder.createAttributeValueType(actionToUse);
        AttributeType actionAttribute =
View Full Code Here

        super(targetNamespaceURI, targetLocalName);
    }

    /** {@inheritDoc} */
    protected void processChildElement(XMLObject parentObject, XMLObject childObject) throws UnmarshallingException {
        ResourceType resource = (ResourceType) parentObject;

        if (childObject instanceof ResourceContentType) {
            resource.setResourceContent((ResourceContentType) childObject);
        } else if (childObject instanceof AttributeType) {
            resource.getAttributes().add((AttributeType) childObject);
        } else {
            super.processChildElement(parentObject, childObject);
        }
    }
View Full Code Here

    ) {
        if (resourceTypeBuilder == null) {
            resourceTypeBuilder = (XACMLObjectBuilder<ResourceType>)
                builderFactory.getBuilder(ResourceType.DEFAULT_ELEMENT_NAME);
        }
        ResourceType resource = resourceTypeBuilder.buildObject();
        if (attributes != null) {
            resource.getAttributes().addAll(attributes);
        }
        resource.setResourceContent(resourceContent);
       
        return resource;
    }
View Full Code Here

                    null,
                    Collections.singletonList(resourceAttributeValue)
            );
        attributes.clear();
        attributes.add(resourceAttribute);
        ResourceType resourceType = RequestComponentBuilder.createResourceType(attributes, null);
       
        // Action
        AttributeValueType actionAttributeValue =
            RequestComponentBuilder.createAttributeValueType(actionToUse);
        AttributeType actionAttribute =
View Full Code Here

TOP

Related Classes of org.opensaml.xacml.ctx.ResourceType

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.