Examples of TimeAttribute


Examples of com.sun.xacml.attr.TimeAttribute

/*  89 */     actionSet.add(new Attribute(new URI("urn:oasis:names:tc:xacml:1.0:action:action-id"), null, null, new StringAttribute(action)));
/*     */
/*  96 */     Set environSet = new HashSet();
/*     */
/*  98 */     URI currentTimeUri = new URI("urn:oasis:names:tc:xacml:1.0:environment:current-time");
/*  99 */     Attribute currentTimeAttr = new Attribute(currentTimeUri, null, null, new TimeAttribute());
/*     */
/* 101 */     environSet.add(currentTimeAttr);
/*     */
/* 104 */     requestCtx = new RequestCtx(subjectSet, resourceSet, actionSet, environSet);
/*     */
View Full Code Here

Examples of com.sun.xacml.attr.TimeAttribute

        long millis = dateTimeHelper();

        if (useCachedEnvValues)
            return currentTime;
        else
            return new TimeAttribute(new Date(millis));
    }
View Full Code Here

Examples of com.sun.xacml.attr.TimeAttribute

            return millis;
        } else {
            // we're caching, so resolve all three values, making sure
            // to use clean copies of the date object since it may be
            // modified when creating the attributes
            currentTime = new TimeAttribute(time);
            currentDate = new DateAttribute(new Date(millis));
            currentDateTime = new DateTimeAttribute(new Date(millis));
        }

        return -1;
View Full Code Here

Examples of com.sun.xacml.attr.TimeAttribute

            break;
        }

        case ID_TIME_GREATER_THAN: {
            TimeAttribute arg0 = (TimeAttribute) (argValues[0]);
            TimeAttribute arg1 = (TimeAttribute) (argValues[1]);

            boolResult = (dateCompare(arg0.getValue(), arg0.getNanoseconds(), arg1.getValue(), arg1
                    .getNanoseconds()) > 0);

            break;
        }

        case ID_TIME_GREATER_THAN_OR_EQUAL: {
            TimeAttribute arg0 = (TimeAttribute) (argValues[0]);
            TimeAttribute arg1 = (TimeAttribute) (argValues[1]);

            boolResult = (dateCompare(arg0.getValue(), arg0.getNanoseconds(), arg1.getValue(), arg1
                    .getNanoseconds()) >= 0);

            break;
        }

        case ID_TIME_LESS_THAN: {
            TimeAttribute arg0 = (TimeAttribute) (argValues[0]);
            TimeAttribute arg1 = (TimeAttribute) (argValues[1]);

            boolResult = (dateCompare(arg0.getValue(), arg0.getNanoseconds(), arg1.getValue(), arg1
                    .getNanoseconds()) < 0);

            break;
        }

        case ID_TIME_LESS_THAN_OR_EQUAL: {
            TimeAttribute arg0 = (TimeAttribute) (argValues[0]);
            TimeAttribute arg1 = (TimeAttribute) (argValues[1]);

            boolResult = (dateCompare(arg0.getValue(), arg0.getNanoseconds(), arg1.getValue(), arg1
                    .getNanoseconds()) <= 0);

            break;
        }

        case ID_DATETIME_GREATER_THAN: {
            DateTimeAttribute arg0 = (DateTimeAttribute) (argValues[0]);
            DateTimeAttribute arg1 = (DateTimeAttribute) (argValues[1]);

            boolResult = (dateCompare(arg0.getValue(), arg0.getNanoseconds(), arg1.getValue(), arg1
                    .getNanoseconds()) > 0);

            break;
        }

        case ID_DATETIME_GREATER_THAN_OR_EQUAL: {
            DateTimeAttribute arg0 = (DateTimeAttribute) (argValues[0]);
            DateTimeAttribute arg1 = (DateTimeAttribute) (argValues[1]);

            boolResult = (dateCompare(arg0.getValue(), arg0.getNanoseconds(), arg1.getValue(), arg1
                    .getNanoseconds()) >= 0);

            break;
        }

        case ID_DATETIME_LESS_THAN: {
            DateTimeAttribute arg0 = (DateTimeAttribute) (argValues[0]);
            DateTimeAttribute arg1 = (DateTimeAttribute) (argValues[1]);

            boolResult = (dateCompare(arg0.getValue(), arg0.getNanoseconds(), arg1.getValue(), arg1
                    .getNanoseconds()) < 0);

            break;
        }

        case ID_DATETIME_LESS_THAN_OR_EQUAL: {
            DateTimeAttribute arg0 = (DateTimeAttribute) (argValues[0]);
            DateTimeAttribute arg1 = (DateTimeAttribute) (argValues[1]);

            boolResult = (dateCompare(arg0.getValue(), arg0.getNanoseconds(), arg1.getValue(), arg1
                    .getNanoseconds()) <= 0);

            break;
        }
View Full Code Here

Examples of com.sun.xacml.attr.TimeAttribute

        // check if any errors occured while resolving the inputs
        if (result != null)
            return result;

        // get the three time values
        TimeAttribute attr = (TimeAttribute) (argValues[0]);
        long middleTime = attr.getMilliseconds();
        long minTime = resolveTime(attr, (TimeAttribute) (argValues[1]));
        long maxTime = resolveTime(attr, (TimeAttribute) (argValues[2]));

        // first off, if the min and max are the same, then this can only
        // be true is the middle is also the same value
View Full Code Here

Examples of org.jboss.security.xacml.sunxacml.attr.TimeAttribute

        // check if any errors occured while resolving the inputs
        if (result != null)
            return result;

        // get the three time values
        TimeAttribute attr = (TimeAttribute)(argValues[0]);
        long middleTime = attr.getMilliseconds();
        long minTime = resolveTime(attr, (TimeAttribute)(argValues[1]));
        long maxTime = resolveTime(attr, (TimeAttribute)(argValues[2]));
       
        // first off, if the min and max are the same, then this can only
        // be true is the middle is also the same value
View Full Code Here

Examples of org.jboss.security.xacml.sunxacml.attr.TimeAttribute

            break;
        }

        case ID_TIME_GREATER_THAN: {
            TimeAttribute arg0 = (TimeAttribute)(argValues[0]);
            TimeAttribute arg1 = (TimeAttribute)(argValues[1]);

            boolResult =
                (dateCompare(arg0.getValue(), arg0.getNanoseconds(),
                             arg1.getValue(), arg1.getNanoseconds()) > 0);

            break;
        }

        case ID_TIME_GREATER_THAN_OR_EQUAL: {
            TimeAttribute arg0 = (TimeAttribute)(argValues[0]);
            TimeAttribute arg1 = (TimeAttribute)(argValues[1]);

            boolResult =
                (dateCompare(arg0.getValue(), arg0.getNanoseconds(),
                             arg1.getValue(), arg1.getNanoseconds()) >= 0);

            break;
        }

        case ID_TIME_LESS_THAN: {
            TimeAttribute arg0 = (TimeAttribute)(argValues[0]);
            TimeAttribute arg1 = (TimeAttribute)(argValues[1]);

            boolResult =
                (dateCompare(arg0.getValue(), arg0.getNanoseconds(),
                             arg1.getValue(), arg1.getNanoseconds()) < 0);

            break;
        }

        case ID_TIME_LESS_THAN_OR_EQUAL: {
            TimeAttribute arg0 = (TimeAttribute)(argValues[0]);
            TimeAttribute arg1 = (TimeAttribute)(argValues[1]);

            boolResult =
                (dateCompare(arg0.getValue(), arg0.getNanoseconds(),
                             arg1.getValue(), arg1.getNanoseconds()) <= 0);

            break;
        }

        case ID_DATETIME_GREATER_THAN: {
            DateTimeAttribute arg0 = (DateTimeAttribute)(argValues[0]);
            DateTimeAttribute arg1 = (DateTimeAttribute)(argValues[1]);

            boolResult =
                (dateCompare(arg0.getValue(), arg0.getNanoseconds(),
                             arg1.getValue(), arg1.getNanoseconds()) > 0);

            break;
        }

        case ID_DATETIME_GREATER_THAN_OR_EQUAL: {
            DateTimeAttribute arg0 = (DateTimeAttribute)(argValues[0]);
            DateTimeAttribute arg1 = (DateTimeAttribute)(argValues[1]);

            boolResult =
                (dateCompare(arg0.getValue(), arg0.getNanoseconds(),
                             arg1.getValue(), arg1.getNanoseconds()) >= 0);

            break;
        }

        case ID_DATETIME_LESS_THAN: {
            DateTimeAttribute arg0 = (DateTimeAttribute)(argValues[0]);
            DateTimeAttribute arg1 = (DateTimeAttribute)(argValues[1]);

            boolResult =
                (dateCompare(arg0.getValue(), arg0.getNanoseconds(),
                             arg1.getValue(), arg1.getNanoseconds()) < 0);

            break;
        }

        case ID_DATETIME_LESS_THAN_OR_EQUAL: {
            DateTimeAttribute arg0 = (DateTimeAttribute)(argValues[0]);
            DateTimeAttribute arg1 = (DateTimeAttribute)(argValues[1]);

            boolResult =
                (dateCompare(arg0.getValue(), arg0.getNanoseconds(),
                             arg1.getValue(), arg1.getNanoseconds()) <= 0);

            break;
        }

        case ID_DATE_GREATER_THAN: {
View Full Code Here

Examples of org.jboss.security.xacml.sunxacml.attr.TimeAttribute

        long millis = dateTimeHelper();

        if (useCachedEnvValues)
            return currentTime;
        else
            return new TimeAttribute(new Date(millis));
    }
View Full Code Here

Examples of org.jboss.security.xacml.sunxacml.attr.TimeAttribute

            return millis;
        } else {
            // we're caching, so resolve all three values, making sure
            // to use clean copies of the date object since it may be
            // modified when creating the attributes
            currentTime = new TimeAttribute(time);
            currentDate = new DateAttribute(new Date(millis));
            currentDateTime = new DateTimeAttribute(new Date(millis));
        }
       
        return -1;
View Full Code Here

Examples of org.jboss.security.xacml.sunxacml.attr.TimeAttribute

        long millis = dateTimeHelper();

        if (useCachedEnvValues)
            return currentTime;
        else
            return new TimeAttribute(new Date(millis));
    }
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.