1 /* 2 Copyright 2008 Members of the EGEE Collaboration. 3 Copyright 2008 University Corporation for Advanced Internet Development, 4 Inc. 5 6 Licensed under the Apache License, Version 2.0 (the "License"); 7 you may not use this file except in compliance with the License. 8 You may obtain a copy of the License at 9 10 http://www.apache.org/licenses/LICENSE-2.0 11 12 Unless required by applicable law or agreed to in writing, software 13 distributed under the License is distributed on an "AS IS" BASIS, 14 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 See the License for the specific language governing permissions and 16 limitations under the License. 17 */ 18 19 package org.opensaml.xacml.ctx; 20 21 import javax.xml.namespace.QName; 22 23 import org.opensaml.xacml.XACMLConstants; 24 import org.opensaml.xacml.XACMLObject; 25 import org.opensaml.xacml.policy.ObligationsType; 26 27 /** XACML context Result schema type. */ 28 public interface ResultType extends XACMLObject { 29 30 /** Local name of the element. */ 31 public static final String DEFAULT_ELEMENT_LOCAL_NAME = "Result"; 32 33 /** Default element name. */ 34 public static final QName DEFAULT_ELEMENT_NAME = new QName(XACMLConstants.XACML20CTX_NS, 35 DEFAULT_ELEMENT_LOCAL_NAME, XACMLConstants.XACMLCONTEXT_PREFIX); 36 37 /** Local name of the XSI type. */ 38 public static final String TYPE_LOCAL_NAME = "ResultType"; 39 40 /** QName of the XSI type. */ 41 public static final QName TYPE_NAME = new QName(XACMLConstants.XACML20CTX_NS, TYPE_LOCAL_NAME, 42 XACMLConstants.XACMLCONTEXT_PREFIX); 43 44 /** ResourceId attribute name. */ 45 public static final String RESOURCE_ID_ATTTRIB_NAME = "ResourceId"; 46 47 /** 48 * Returns the decision in the result. 49 * 50 * @return XACMLDecision the decision in the result 51 */ 52 public DecisionType getDecision(); 53 54 /** 55 * Returns the list of Obligations in the result. 56 * 57 * @return the list of Obligations in the result 58 */ 59 public ObligationsType getObligations(); 60 61 /** 62 * Sets the obligations for this result. 63 * 64 * @param obligations obligations for this result 65 */ 66 public void setObligations(ObligationsType obligations); 67 68 /** 69 * Gets the ResourceId of the result. 70 * 71 * @return The ResourceId of the subject 72 */ 73 public String getResourceId(); 74 75 /** 76 * Returns the status in the result. 77 * 78 * @return the status in the result 79 */ 80 public StatusType getStatus(); 81 82 /** 83 * Sets the result status. 84 * 85 * @param status result status 86 */ 87 public void setStatus(StatusType status); 88 89 /** 90 * Sets the decision in the result. 91 * 92 * @param newDecision The decision in the result 93 */ 94 public void setDecision(DecisionType newDecision); 95 96 /** 97 * Sets the ResourceId. 98 * 99 * @param resourceId is the ResourceId 100 */ 101 public void setResourceId(String resourceId); 102 }