1 /* 2 * Copyright 2008 Members of the EGEE Collaboration. 3 * Copyright 2008 University Corporation for Advanced Internet Development, Inc. 4 * 5 * Licensed under the Apache License, Version 2.0 (the "License"); 6 * you may not use this file except in compliance with the License. 7 * You may obtain a copy of the License at 8 * 9 * http://www.apache.org/licenses/LICENSE-2.0 10 * 11 * Unless required by applicable law or agreed to in writing, software 12 * distributed under the License is distributed on an "AS IS" BASIS, 13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 * See the License for the specific language governing permissions and 15 * limitations under the License. 16 */ 17 18 package org.opensaml.xacml.policy; 19 20 import java.util.List; 21 22 import javax.xml.namespace.QName; 23 24 import org.opensaml.xacml.XACMLConstants; 25 import org.opensaml.xacml.XACMLObject; 26 27 /** XACML Policy schema type. */ 28 public interface PolicyType extends XACMLObject { 29 30 /** Local name of the element Policy. */ 31 public static final String DEFAULT_ELEMENT_LOCAL_NAME = "Policy"; 32 33 /** QName of the element Policy. */ 34 public static final QName DEFAULT_ELEMENT_NAME = new QName(XACMLConstants.XACML20_NS, DEFAULT_ELEMENT_LOCAL_NAME, 35 XACMLConstants.XACML_PREFIX); 36 37 /** Local name of the XSI type. */ 38 public static final String SCHEMA_TYPE_LOCAL_NAME = "PolicyType"; 39 40 /** QName of the XSI type. */ 41 public static final QName SCHEMA_TYPE_NAME = new QName(XACMLConstants.XACML20_NS, SCHEMA_TYPE_LOCAL_NAME, 42 XACMLConstants.XACML_PREFIX); 43 44 /** PolicyId attribute name. */ 45 public static final String POLICY_ID_ATTRIB_NAME = "PolicyId"; 46 47 /** Version attribute name. */ 48 public static final String VERSION_ATTRIB_NAME = "Version"; 49 50 /** RuleCombiningAlgId attribute name. */ 51 public static final String RULE_COMBINING_ALG_ID_ATTRIB_NAME = "RuleCombiningAlgId"; 52 53 /** 54 * Gets the description for this policy. 55 * 56 * @return description for this policy 57 */ 58 public DescriptionType getDescription(); 59 60 /** 61 * Sets the description for this policy. 62 * 63 * @param description description for this policy 64 */ 65 public void setDescription(DescriptionType description); 66 67 /** 68 * Gets the defaults for this policy. 69 * 70 * @return defaults for this policy 71 */ 72 public DefaultsType getPolicyDefaults(); 73 74 /** 75 * Sets the defaults for this policy. 76 * 77 * @param defaults defaults for this policy 78 */ 79 public void setPolicyDefaults(DefaultsType defaults); 80 81 /** 82 * Gets the target of this policy. 83 * 84 * @return target of this policy 85 */ 86 public TargetType getTarget(); 87 88 /** 89 * Sets the target of this policy. 90 * 91 * @param target target of this policy 92 */ 93 public void setTarget(TargetType target); 94 95 /** 96 * Gets the combiner parameters for this policy. 97 * 98 * @return combiner parameters for this policy 99 */ 100 public List<CombinerParametersType> getCombinerParameters(); 101 102 /** 103 * Gets the rule combiner parameters for this policy. 104 * 105 * @return rule combiner parameters for this policy 106 */ 107 public List<RuleCombinerParametersType> getRuleCombinerParameters(); 108 109 /** 110 * Gets the variable definition for this policy. 111 * 112 * @return variable definition for this policy 113 */ 114 public List<VariableDefinitionType> getVariableDefinitions(); 115 116 /** 117 * Gets the rules for this policy. 118 * 119 * @return rules for this policy 120 */ 121 public List<RuleType> getRules(); 122 123 /** 124 * Gets the obligations of this policy. 125 * 126 * @return obligations of this policy 127 */ 128 public ObligationsType getObligations(); 129 130 /** 131 * Sets the obligations of this policy. 132 * 133 * @param obligations obligations of this policy 134 */ 135 public void setObligations(ObligationsType obligations); 136 137 /** 138 * Gets the ID of this policy. 139 * 140 * @return ID of this policy 141 */ 142 public String getPolicyId(); 143 144 /** 145 * Sets the ID of this policy. 146 * 147 * @param id ID of this policy 148 */ 149 public void setPolicyId(String id); 150 151 /** 152 * Gets the XACML version of this policy. 153 * 154 * @return XACML version of this policy 155 */ 156 public String getVersion(); 157 158 /** 159 * Sets the XACML version of this policy. 160 * 161 * @param version XACML version of this policy 162 */ 163 public void setVersion(String version); 164 165 /** 166 * Gets the rule combining algorithm used with this policy. 167 * 168 * @return rule combining algorithm used with this policy 169 */ 170 public String getRuleCombiningAlgoId(); 171 172 /** 173 * Sets the rule combining algorithm used with this policy. 174 * 175 * @param id rule combining algorithm used with this policy 176 */ 177 public void setRuleCombiningAlgoId(String id); 178 }