/** * Constructor that creates an XACML 2.0 <code>Target</code> from * components. Each of the sections must be non-null, but they may * match any request. * * @param subjectsSection a <code>TargetSection</code> representing * the Subjects section of this target * @param resourcesSection a <code>TargetSection</code> representing * the Resources section of this target * @param actionsSection a <code>TargetSection</code> representing * the Actions section of this target * @param environmentsSection a <code>TargetSection</code> representing * the Environments section of this target */ public Target(TargetSection subjectsSection, TargetSection resourcesSection, TargetSection actionsSection, TargetSection environmentsSection) { if ((subjectsSection == null) || (resourcesSection == null) || (actionsSection == null) || (environmentsSection == null)) throw new ProcessingException("All sections of a Target must " + "be non-null"); this.subjectsSection = subjectsSection; this.resourcesSection = resourcesSection; this.actionsSection = actionsSection; this.environmentsSection = environmentsSection; this.xacmlVersion = PolicyMetaData.XACML_VERSION_2_0; }
/** * Constructor that creates an XACML 1.x <code>Target</code> from * components. Each of the sections must be non-null, but they may match * any request. Because this is only used for 1.x Targets, there is no * Environments section. * * @param subjectsSection a <code>TargetSection</code> representing * the Subjects section of this target * @param resourcesSection a <code>TargetSection</code> representing * the Resources section of this target * @param actionsSection a <code>TargetSection</code> representing * the Actions section of this target */ public Target(TargetSection subjectsSection, TargetSection resourcesSection, TargetSection actionsSection) { if ((subjectsSection == null) || (resourcesSection == null) || (actionsSection == null)) throw new ProcessingException("All sections of a Target must " + "be non-null"); this.subjectsSection = subjectsSection; this.resourcesSection = resourcesSection; this.actionsSection = actionsSection; this.environmentsSection = new TargetSection(null, TargetMatch.ENVIRONMENT, PolicyMetaData.XACML_VERSION_1_0); this.xacmlVersion = PolicyMetaData.XACML_VERSION_1_0; }
throw new ProcessingException("variable is unsupported: " + variableId); throw new ProcessingException("processing in progress"); } catch (ParsingException pe) { throw new ProcessingException("failed to parse the definition", pe); throw new ProcessingException("couldn't retrieve definition: " + variableId);
/** * Private helper method that tried to resolve the policy */ private AbstractPolicy resolvePolicy() { // see if this reference was setup with a finder if (finder == null) { if (logger.isLoggable(Level.WARNING)) logger.warning("PolicyReference with id " + reference.toString() + " was queried but was " + "not configured with a PolicyFinder"); throw new ProcessingException("couldn't find the policy with " + "a null finder"); } PolicyFinderResult pfr = finder.findPolicy(reference, policyType, constraints, parentMetaData); if (pfr.notApplicable()) throw new ProcessingException("couldn't resolve the policy"); if (pfr.indeterminate()) throw new ProcessingException("error resolving the policy"); return pfr.getPolicy(); }
/** * Creates a new <code>TimeAttribute</code> that represents * the time supplied. * * @param time a <code>Date</code> object representing the * specified time down to second resolution. This * date should have a date of 01/01/1970. If it does * not, such a date will be forced. If this object * has non-zero milliseconds, they are combined * with the nanoseconds parameter. * @param nanoseconds the number of nanoseconds beyond the * Date specified in the date parameter * @param timeZone the time zone specified for this object * (or TZ_UNSPECIFIED if unspecified). The * offset to GMT, in minutes. * @param defaultedTimeZone the time zone actually used for this * object, which must be specified. * The offset to GMT, in minutes. */ public TimeAttribute(Date time, int nanoseconds, int timeZone, int defaultedTimeZone) { super(identifierURI); // if the timezone is unspecified, it's illegal for the defaulted // timezone to also be unspecified if ((timeZone == TZ_UNSPECIFIED) && (defaultedTimeZone == TZ_UNSPECIFIED)) throw new ProcessingException("default timezone must be specified" + "when a timezone is provided"); init(time, nanoseconds, timeZone, defaultedTimeZone); }
throw new ProcessingException("variable not supported: " + variableId); throw new ProcessingException("we couldn't establish the type: " + variableId);
throw new ProcessingException("variable not supported: " + variableId); throw new ProcessingException("couldn't establish bag return for " + variableId);
/** * Returns the type of the referenced expression. * * @return the attribute return type of the referenced expression * * @throws ProcessingException if the type couldn't be resolved */ public URI getType() { // if we have a concrete definition, then ask it for the type, // otherwise query the manager using the getVariableType method, // since this handles type-checking for definitions that haven't // been parsed yet if (definition != null) { return definition.getExpression().getType(); } else { if (manager != null) return manager.getVariableType(variableId); } throw new ProcessingException("couldn't resolve the type"); }
/** * Tells whether evaluation will return a bag or a single value. * * @return true if evaluation will return a bag, false otherwise * * @throws ProcessingException if the return type couldn't be resolved */ public boolean returnsBag() { // see comment in getType() if (definition != null) { return getReferencedDefinition().getExpression().returnsBag(); } else { if (manager != null) return manager.returnsBag(variableId); } throw new ProcessingException("couldn't resolve the return type"); }
AUTH_HOLDER authHolder = openIDProtoCtx.getAuthenticationHolder(); if (authHolder == null) throw new ProcessingException("Authentication Holder is null"); break; default: throw new ProcessingException("Unknown mode");
AUTH_HOLDER authHolder = openIDProtoCtx.getAuthenticationHolder(); if (authHolder == null) throw new ProcessingException("Authentication Holder is null"); break; default: throw new ProcessingException("Unknown mode");
OpenIDProtocolContext.AUTH_HOLDER authHolder = openIDProtoCtx.getAuthenticationHolder(); if (authHolder == null) { throw new ProcessingException("Authentication Holder is null"); break; default: throw new ProcessingException("Unknown mode");
OpenIDProtocolContext.AUTH_HOLDER authHolder = openIDProtoCtx.getAuthenticationHolder(); if (authHolder == null) { throw new ProcessingException("Authentication Holder is null"); break; default: throw new ProcessingException("Unknown mode");