Examples of AttributeValue


Examples of com.sun.xacml.attr.AttributeValue

        }

    }

    protected AttributeValue createAttributeValueFromObject(Serializable object) {
        AttributeValue retVal = null;

        if (object instanceof String)
            retVal = new StringAttribute((String) object);
        if (object instanceof URI)
            retVal = new AnyURIAttribute((URI) object);

Examples of com.sun.xacml.attr.AttributeValue

     */
    private Set<Attribute> getAttributes(String uri, String type, final String value)
            throws URISyntaxException {
        Set<Attribute> attrs = new HashSet<Attribute>();

        AttributeValue attrValues = new AttributeValue(new URI(type)) {
            @Override
            public String encode() {
                return value;
            }
        };

Examples of com.sun.xacml.attr.AttributeValue

     * @throws URISyntaxException
     */
    private Attribute getAttribute(String uri, String type, final String value)
            throws URISyntaxException {

        AttributeValue attrValues = new AttributeValue(new URI(type)) {
            @Override
            public String encode() {
                return value;
            }
        };

Examples of com.sun.xacml.attr.AttributeValue

            subject = context.getSubjectAttribute(new URI(StringAttribute.identifier), new URI(
                    "urn:oasis:names:tc:xacml:1.0:subject:subject-id"), subjectCategory);
            if (subject.getAttributeValue().isBag()) {
                BagAttribute attr = (BagAttribute) subject.getAttributeValue();
                for (Iterator iterator = attr.iterator(); iterator.hasNext();) {
                    AttributeValue val = (AttributeValue) iterator.next();
                    subjectId = val.encode();
                    if (log.isDebugEnabled()) {
                        log.debug(String.format("Finding attributes for the subject %1$s",
                                subjectId));
                    }
                    break;
                }

            }

            resource = context.getResourceAttribute(new URI(StringAttribute.identifier), new URI(
                    "urn:oasis:names:tc:xacml:1.0:resource:resource-id"), null);
            if (resource.getAttributeValue().isBag()) {
                BagAttribute attr = (BagAttribute) resource.getAttributeValue();
                for (Iterator iterator = attr.iterator(); iterator.hasNext();) {
                    AttributeValue val = (AttributeValue) iterator.next();
                    resourceId = val.encode();
                    if (log.isDebugEnabled()) {
                        log.debug(String.format("Finding attributes for the resource %1$s",
                                resourceId));
                    }
                    break;
                }

            }

            for (Iterator iterator = finders.iterator(); iterator.hasNext();) {
                PIPAttributeFinder pipAttributeFinder = (PIPAttributeFinder) iterator.next();
                if (log.isDebugEnabled()) {
                    log.debug(String.format(
                            "Finding attributes with the PIP attribute handler %1$s",
                            pipAttributeFinder.getClass()));
                }
                Set<String> attrs = pipAttributeFinder.getAttributeValues(subjectId, resourceId,
                        attributeId.toString());
                if (attrs != null) {
                    for (Iterator iterAttr = attrs.iterator(); iterAttr.hasNext();) {
                        final String attr = (String) iterAttr.next();
                        AttributeValue attribute = getAttribute(attr, attributeType.toString());
                        attrBag.add(attribute);
                    }
                }
            }

Examples of com.sun.xacml.attr.AttributeValue

        }
        if (HexBinaryAttribute.identifier.equals(type)) {
            return new HexBinaryAttribute(value.getBytes());
        }

        return new AttributeValue(new URI(type)) {
            @Override
            public String encode() {
                return value;
            }
        };

Examples of net.sf.jz3950.query.model.AttributeValue

            if (localAttributeSet == null)
            {
                localAttributeSet = namespaceId;
            }

            attributePlusTermNode.setAttribute(localAttributeSet + "." + attributeType, new AttributeValue(localAttributeSet, attributeType + "." + attributeValue));
        }

        // See if we have an element name
        if (currentToken == PrefixQuery.TOKEN_ELEMENTNAME)
        {

Examples of org.apache.harmony.security.x501.AttributeValue

        while (true) {

            if (pos == length) {

                //empty Attribute Value
                atav.add(new AttributeTypeAndValue(attType, new AttributeValue(
                        "", false))); //$NON-NLS-1$
                list.add(0, atav);

                return list;
            }

            switch (chars[pos]) {
            case '"':
                attValue = quotedAV();
                atav.add(new AttributeTypeAndValue(attType, new AttributeValue(
                        attValue, hasQE)));
                break;
            case '#':
                attValue = hexAV();

                atav.add(new AttributeTypeAndValue(attType, new AttributeValue(
                        attValue, encoded)));
                break;
            case '+':
            case ',':
            case ';': // compatibility with RFC 1779: semicolon can separate RDNs
                //empty attribute value
                atav.add(new AttributeTypeAndValue(attType, new AttributeValue(
                        "", false))); //$NON-NLS-1$
                break;
            default:
                attValue = escapedAV();
                atav.add(new AttributeTypeAndValue(attType, new AttributeValue(
                        attValue, hasQE)));
            }

            if (pos >= length) {
                list.add(0, atav);

Examples of org.apache.harmony.security.x501.AttributeValue

        while (true) {

            if (pos == length) {

                //empty Attribute Value
                atav.add(new AttributeTypeAndValue(attType, new AttributeValue(
                        "", false))); //$NON-NLS-1$
                list.add(0, atav);

                return list;
            }

            switch (chars[pos]) {
            case '"':
                attValue = quotedAV();
                atav.add(new AttributeTypeAndValue(attType, new AttributeValue(
                        attValue, hasQE)));
                break;
            case '#':
                attValue = hexAV();

                atav.add(new AttributeTypeAndValue(attType, new AttributeValue(
                        attValue, encoded)));
                break;
            case '+':
            case ',':
            case ';': // compatibility with RFC 1779: semicolon can separate RDNs
                //empty attribute value
                atav.add(new AttributeTypeAndValue(attType, new AttributeValue(
                        "", false))); //$NON-NLS-1$
                break;
            default:
                attValue = escapedAV();
                atav.add(new AttributeTypeAndValue(attType, new AttributeValue(
                        attValue, hasQE)));
            }

            if (pos >= length) {
                list.add(0, atav);

Examples of org.apache.harmony.security.x501.AttributeValue

        SubjectPublicKeyInfo spki = new SubjectPublicKeyInfo(
                new AlgorithmIdentifier("1.2.840.113549.1.1.2"), new byte[4]);
        List attributes = new ArrayList();
        // 1.2.840.113549.1.9.1 is OID of EMAILADDRESS
        attributes.add(new AttributeTypeAndValue("1.2.840.113549.1.9.1",
                new AttributeValue("a@b.com", false)));

        CertificationRequestInfo certReqInfo = new CertificationRequestInfo(
                version, subject, spki, attributes);

        // check what we have constructed

Examples of org.apache.harmony.security.x501.AttributeValue

        SubjectPublicKeyInfo spki = new SubjectPublicKeyInfo(
                new AlgorithmIdentifier("1.2.840.113549.1.1.2"), new byte[4]);
        List attributes = new ArrayList();
        // 1.2.840.113549.1.9.1 is OID of EMAILADDRESS
        attributes.add(new AttributeTypeAndValue("1.2.840.113549.1.9.1",
                new AttributeValue("a@b.com", false)));
        CertificationRequestInfo certReqInfo = new CertificationRequestInfo(
                version, subject, spki, attributes);
        AlgorithmIdentifier signatureAlgId = new AlgorithmIdentifier(
                "1.2.3.44.555");
        byte[] signature = { (byte) 0x01, (byte) 0x02, (byte) 0x03,
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.