Package com.sun.xacml.attr

Examples of com.sun.xacml.attr.StringAttribute


                if ("methods".equals(parts[2])) {
                    String sDefPid = parts[3];
                    String methodName = parts[4];
                    if (sDefPid != null && !"".equals(sDefPid)) {
                        resAttr.put(Constants.SDEF.PID.getURI(),
                                new StringAttribute(sDefPid));
                    }
                    if (methodName != null && !"".equals(methodName)) {
                        resAttr.put(Constants.DISSEMINATOR.METHOD.getURI(),
                                new StringAttribute(methodName));
                    }
                }

                if (asOfDateTime != null && !"".equals(asOfDateTime)) {
                    resAttr.put(Constants.DATASTREAM.AS_OF_DATETIME.getURI(),
View Full Code Here


        try {
            String[] parts = getPathParts(request);
            resAttr = ResourceAttributes.getResources(parts);
            if (versionable != null && !"".equals(versionable)) {
                resAttr.put(Constants.DATASTREAM.NEW_VERSIONABLE.getURI(),
                            new StringAttribute(versionable));
            }

            actions
                    .put(Constants.ACTION.ID.getURI(),
                         Constants.ACTION.SET_DATASTREAM_VERSIONABLE
View Full Code Here

                resAttr.put(Constants.OBJECT.N_PIDS.getURI(),
                            new IntegerAttribute(numPids));
            }
            if (pidNamespace != null && !"".equals(pidNamespace)) {
                resAttr.put(Constants.OBJECT.NAMESPACE.getURI(),
                            new StringAttribute(pidNamespace));
            }

            actions.put(Constants.ACTION.ID.getURI(),
                        Constants.ACTION.GET_NEXT_PID
                                .getStringAttribute());
View Full Code Here

            }

            try {
                actions
                        .put(Constants.ACTION.ID.getURI(),
                             new StringAttribute(Constants.ACTION.LIST_OBJECT_IN_RESOURCE_INDEX_RESULTS
                                     .getURI().toASCIIString()));
                actions.put(Constants.ACTION.API.getURI(),
                            new StringAttribute(Constants.ACTION.APIA.getURI()
                                    .toASCIIString()));

                // Modification to uniquely identify datastreams

                resAttr = ResourceAttributes.getResources(pid);
                if (dsID != null && !"".equals(dsID)) {
                    resAttr.put(Constants.DATASTREAM.ID.getURI(),
                                new StringAttribute(dsID));
                }

                RequestCtx req =
                        m_contextUtil.buildRequest(getSubjects(request),
                                                 actions,
View Full Code Here

        try {
            resAttr = ResourceAttributes.getResources(pid);
           
            if (dsID != null && !"".equals(dsID)) {
                resAttr.put(Constants.DATASTREAM.ID.getURI(),
                            new StringAttribute(dsID));
            }
            if (dissID != null && !"".equals(dissID)) {
                resAttr.put(Constants.DISSEMINATOR.ID.getURI(),
                            new StringAttribute(dissID));
            }
            if (methodName != null && !"".equals(methodName)) {
                resAttr.put(Constants.DISSEMINATOR.METHOD.getURI(),
                            new StringAttribute(methodName));
            }
            if (dateTime != null && !"".equals(dateTime)) {
                resAttr.put(Constants.DATASTREAM.AS_OF_DATETIME.getURI(),
                            DateTimeAttribute.getInstance(dateTime));
            }
View Full Code Here

        Map<URI, AttributeValue> resAttr;
        try {
            resAttr = ResourceAttributes.getResources(parts);
            if (mimeType != null && !"".equals(mimeType)) {
                resAttr.put(Constants.DATASTREAM.NEW_MIME_TYPE.getURI(),
                            new StringAttribute(mimeType));
            }
            if (formatURI != null && !"".equals(formatURI)) {
                resAttr.put(Constants.DATASTREAM.NEW_FORMAT_URI.getURI(),
                            new AnyURIAttribute(new URI(formatURI)));
            }
            if (dsLocation != null && !"".equals(dsLocation)) {
                resAttr.put(Constants.DATASTREAM.NEW_LOCATION.getURI(),
                            new AnyURIAttribute(new URI(dsLocation)));
            }
            if (checksumType != null && !"".equals(checksumType)) {
                resAttr.put(Constants.DATASTREAM.NEW_CHECKSUM_TYPE.getURI(),
                            new StringAttribute(checksumType));
            }
            if (checksum != null && !"".equals(checksum)) {
                resAttr.put(Constants.DATASTREAM.NEW_CHECKSUM.getURI(),
                            new StringAttribute(checksum));
            }

            String action = null;
            if (dsLocation != null && !"".equals(dsLocation)) {
                action =
                        Constants.ACTION.MODIFY_DATASTREAM_BY_REFERENCE
                                .getURI().toASCIIString();
            } else {
                action =
                        Constants.ACTION.MODIFY_DATASTREAM_BY_VALUE.getURI()
                                .toASCIIString();
            }

            actions.put(Constants.ACTION.ID.getURI(),
                        new StringAttribute(action));
            actions.put(Constants.ACTION.API.getURI(),
                        Constants.ACTION.APIM.getStringAttribute());

            // modifying the FeSL policy datastream requires policy management permissions
            String dsID = parts[3];
View Full Code Here

            if (parts.length > 3){
                if ("methods".equals(parts[2])) {
                    String sDefPid = parts[3];
                    if (sDefPid != null && !"".equals(sDefPid)) {
                        resAttr.put(Constants.SDEF.PID.getURI(),
                                new StringAttribute(sDefPid));
                    }
                }
            }

            if (asOfDateTime != null && !"".equals(asOfDateTime)) {
View Full Code Here

        try {
            String[] parts = getPathParts(request);
            resAttr = ResourceAttributes.getResources(parts);
            if (dsState != null && !"".equals(dsState)) {
                resAttr.put(Constants.DATASTREAM.NEW_STATE.getURI(),
                            new StringAttribute(dsState));
            }

            actions
                    .put(Constants.ACTION.ID.getURI(),
                         Constants.ACTION.SET_DATASTREAM_STATE
View Full Code Here

        try {
            String[] parts = getPathParts(request);
            resAttr = ResourceAttributes.getResources(parts);
            if (state != null && !"".equals(state)) {
                resAttr.put(Constants.OBJECT.STATE.getURI(),
                            new StringAttribute(state));
            }
            if (ownerId != null && !"".equals(ownerId)) {
                resAttr.put(Constants.OBJECT.OWNER.getURI(),
                            new StringAttribute(state));
            }

            if (state != null && state.equals("A")) {
                actions.put(Constants.ACTION.ID.getURI(),
                            new StringAttribute("publish"));
            } else if (state != null && state.equals("I")) {
                actions.put(Constants.ACTION.ID.getURI(),
                            new StringAttribute("unpublish"));
            } else {
                actions.put(Constants.ACTION.ID.getURI(),
                            Constants.ACTION.MODIFY_OBJECT
                                    .getStringAttribute());
            }
View Full Code Here

      String username = principal.getName();
     
      //Create the subject set
      URI subjectAttrUri = new URI(XACMLConstants.SUBJECT_IDENTIFIER);
      Attribute subjectAttr = new Attribute(subjectAttrUri,null,null,
            new StringAttribute(username));
      Set subjectAttrSet = new HashSet();
      subjectAttrSet.add(subjectAttr);
      subjectAttrSet.addAll(getXACMLRoleSet(roles));
     
      Set subjectSet = new HashSet();
      subjectSet.add(new Subject(subjectAttrSet));
     
      //Create the resource set
      URI resourceUri = new URI(XACMLConstants.RESOURCE_IDENTIFIER);
      Attribute resourceAttr = new Attribute(resourceUri,null,null,
            new StringAttribute(ejbName));
      Set resourceSet = new HashSet();
      resourceSet.add(resourceAttr);
     
      //Create the action set
      Set actionSet = new HashSet();
      actionSet.add(new Attribute(new URI(XACMLConstants.ACTION_IDENTIFIER),
             null,null, new StringAttribute(action)));
     
     
      //TODO: Get hold of the invocation arguments and populate in the xacml request
     
      //Create the Environment set
View Full Code Here

TOP

Related Classes of com.sun.xacml.attr.StringAttribute

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.