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 javax.xml.namespace.QName; 21 22 import org.opensaml.xacml.XACMLConstants; 23 import org.opensaml.xacml.XACMLObject; 24 25 /** XACML Rule schema type. */ 26 public interface RuleType extends XACMLObject { 27 28 /** Local name of the element Rule. */ 29 public static final String DEFAULT_ELEMENT_LOCAL_NAME = "Rule"; 30 31 /** QName of the element Rule. */ 32 public static final QName DEFAULT_ELEMENT_NAME = new QName(XACMLConstants.XACML20_NS, DEFAULT_ELEMENT_LOCAL_NAME, 33 XACMLConstants.XACML_PREFIX); 34 35 /** Local name of the XSI type. */ 36 public static final String SCHEMA_TYPE_LOCAL_NAME = "RuleType"; 37 38 /** QName of the XSI type. */ 39 public static final QName SCHEMA_TYPE_NAME = new QName(XACMLConstants.XACML20_NS, SCHEMA_TYPE_LOCAL_NAME, 40 XACMLConstants.XACML_PREFIX); 41 42 /** RuleId attribute name. */ 43 public static final String RULE_ID_ATTRIB_NAME = "RuleId"; 44 45 /** Effect attribute name. */ 46 public static final String EFFECT_ATTRIB_NAME = "Effect"; 47 48 /** 49 * Gets the description of this rule. 50 * 51 * @return description of this rule 52 */ 53 public DescriptionType getDescription(); 54 55 /** 56 * Sets the description of this rule. 57 * 58 * @param description the description of this rule 59 */ 60 public void setDescription(DescriptionType description); 61 62 /** 63 * Gets the target of this rule. 64 * 65 * @return the target of this rule 66 */ 67 public TargetType getTarget(); 68 69 /** 70 * Sets the target of this rule. 71 * 72 * @param target the target of this rule 73 */ 74 public void setTarget(TargetType target); 75 76 /** 77 * Gets the condition for this rule. 78 * 79 * @return the condition for this rule 80 */ 81 public ConditionType getCondition(); 82 83 /** 84 * Sets the the condition for this rule. 85 * 86 * @param condition the condition for this rule 87 */ 88 public void setCondition(ConditionType condition); 89 90 /** 91 * Gets the ID for this rule. 92 * 93 * @return the ID for this rule 94 */ 95 public String getRuleId(); 96 97 /** 98 * Sets the ID for this rule. 99 * 100 * @param id the ID for this rule 101 */ 102 public void setRuleId(String id); 103 104 /** 105 * Gets the effect of the rule. 106 * 107 * @return the effect of the rule 108 */ 109 public EffectType getEffect(); 110 111 /** 112 * Sets the effect of the rule. 113 * 114 * @param type the effect of the rule 115 */ 116 public void setEffect(EffectType type); 117 }