Examples of RequestType


Examples of org.jolokia.util.RequestType

                if (commandNode.getNodeType() != Node.ELEMENT_NODE) {
                    continue;
                }
                assertNodeName(commandNode,"command");
                String typeName = commandNode.getTextContent().trim();
                RequestType type = RequestType.getTypeByName(typeName);
                typeSet.add(type);
            }
        }
    }
View Full Code Here

Examples of org.jolokia.util.RequestType

     * @param pPathInfo path info of HTTP request
     * @param pParameterMap HTTP Query parameters
     * @return a newly created {@link JmxRequest}
     */
    public static <R extends JmxRequest> R createGetRequest(String pPathInfo, Map<String,String[]> pParameterMap) {
        RequestType type = null;
        try {
            String pathInfo = extractPathInfo(pPathInfo, pParameterMap);

            // Get all path elements as a reverse stack
            Stack<String> elements = PathUtil.extractElementsFromPath(pathInfo);
View Full Code Here

Examples of org.jolokia.util.RequestType

     */
    public static <R extends JmxRequest> R createPostRequest(Map<String, ?> pRequestMap, Map<String, String[]> pParameterMap) {
        try {
            Map<String,String> params = mergeMaps((Map<String,String>) pRequestMap.get("config"),
                                                  extractParameters(pParameterMap));
            RequestType type = RequestType.getTypeByName((String) pRequestMap.get("type"));
            return (R) getProcessor(type).process(pRequestMap,params);
        } catch (MalformedObjectNameException e) {
            throw new IllegalArgumentException("Invalid object name. " + e.getMessage(),e);
        }
    }
View Full Code Here

Examples of org.opensaml.xacml.ctx.RequestType

        attributes.clear();
        attributes.add(actionAttribute);
        ActionType action = RequestComponentBuilder.createActionType(attributes);
       
        // Request
        RequestType request =
            RequestComponentBuilder.createRequestType(
                    Collections.singletonList(subject),
                    Collections.singletonList(resource),
                    action,
                    null
View Full Code Here

Examples of org.opensaml.xacml.ctx.RequestType

        attributes.add(environmentAttribute);
        EnvironmentType environmentType =
             RequestComponentBuilder.createEnvironmentType(attributes);
       
        // Request
        RequestType request =
            RequestComponentBuilder.createRequestType(
                    Collections.singletonList(subject),
                    Collections.singletonList(resource),
                    action,
                    environmentType
View Full Code Here

Examples of org.opensaml.xacml.ctx.RequestType

        }
        EnvironmentType environmentType =
            RequestComponentBuilder.createEnvironmentType(attributes);
       
        // Request
        RequestType request =
            RequestComponentBuilder.createRequestType(
                Collections.singletonList(subjectType),
                Collections.singletonList(resourceType),
                actionType,
                environmentType
View Full Code Here

Examples of org.opensaml.xacml.ctx.RequestType

     * Perform a (remote) authorization decision and return a boolean depending on the result
     */
    protected boolean authorize(
        Principal principal, List<String> roles, Message message
    ) throws Exception {
        RequestType request = requestBuilder.createRequest(principal, roles, message);
        if (LOG.isLoggable(Level.FINE)) {
            Document doc = DOMUtils.createDocument();
            Element requestElement = OpenSAMLUtil.toDom(request, doc);
            LOG.log(Level.FINE, DOM2Writer.nodeToString(requestElement));
        }
View Full Code Here

Examples of org.opensaml.xacml.ctx.RequestType

        attributes.clear();
        attributes.add(actionAttribute);
        ActionType action = RequestComponentBuilder.createActionType(attributes);
       
        // Request
        RequestType request =
            RequestComponentBuilder.createRequestType(
                    Collections.singletonList(subject),
                    Collections.singletonList(resource),
                    action,
                    null
View Full Code Here

Examples of org.opensaml.xacml.ctx.RequestType

        msg.put(Message.WSDL_SERVICE, QName.valueOf(service));
        String resourceURL = "/doubleit";
        msg.put(Message.REQUEST_URI, resourceURL);
       
        XACMLRequestBuilder builder = new DefaultXACMLRequestBuilder();
        RequestType request =
            builder.createRequest(principal, Collections.singletonList("manager"), msg);
        assertNotNull(request);
    }
View Full Code Here

Examples of org.opensaml.xacml.ctx.RequestType

        msg.put(Message.WSDL_SERVICE, QName.valueOf(service));
        String resourceURL = "/doubleit";
        msg.put(Message.REQUEST_URI, resourceURL);
       
        XACMLRequestBuilder builder = new DefaultXACMLRequestBuilder();
        RequestType request =
            builder.createRequest(principal, Collections.singletonList("manager"), msg);
        assertNotNull(request);
       
        String action =
            request.getAction().getAttributes().get(0).getAttributeValues().get(0).getValue();
        assertEquals(action, "execute");
       
        ((DefaultXACMLRequestBuilder)builder).setAction("write");
        request = builder.createRequest(principal, Collections.singletonList("manager"), msg);
        assertNotNull(request);
       
        action =
            request.getAction().getAttributes().get(0).getAttributeValues().get(0).getValue();
        assertEquals(action, "write");
    }
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.