Update of /cvsroot/sunxacml/sunxacml/com/sun/xacml
In directory sc8-pr-cvs1:/tmp/cvs-serv22177/com/sun/xacml
Modified Files:
Target.java TargetMatch.java
Log Message:
Added accessor methods for Target-related and Function-related classes
Index: Target.java
===================================================================
RCS file: /cvsroot/sunxacml/sunxacml/com/sun/xacml/Target.java,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** Target.java 13 Feb 2003 22:19:10 -0000 1.1.1.1
--- Target.java 29 Jul 2003 22:01:46 -0000 1.2
***************
*** 40,43 ****
--- 40,44 ----
import java.util.ArrayList;
+ import java.util.Collections;
import java.util.Iterator;
import java.util.List;
***************
*** 77,91 ****
this.subjects = subjects;
else
! this.subjects = new ArrayList(subjects);
if (resources == null)
this.resources = resources;
else
! this.resources = new ArrayList(resources);
if (actions == null)
this.actions = actions;
else
! this.actions = new ArrayList(actions);
}
--- 78,92 ----
this.subjects = subjects;
else
! this.subjects = Collections.unmodifiableList(subjects);
if (resources == null)
this.resources = resources;
else
! this.resources = Collections.unmodifiableList(resources);
if (actions == null)
this.actions = actions;
else
! this.actions = Collections.unmodifiableList(actions);
}
***************
*** 167,171 ****
}
! return list;
}
--- 168,223 ----
}
! return Collections.unmodifiableList(list);
! }
!
! /**
! * Returns an unmodifiable <code>List</code> that represents the Subjects
! * section of this target. Each entry in the <code>List</code> is
! * another <code>List</code> that represents the Subject section. In turn,
! * each of these <code>List</code>s contains <code>TargetMatch</code>
! * objects that represent SubjectMatch XML structures.
! * <p>
! * Note that future versions of this code may use intermediary classes to
! * make the structure clearer, but this depends on the future structure
! * of XACML Targets.
! *
! * @return the matching elements or null of the match is any
! */
! public List getSubjects() {
! return subjects;
! }
!
! /**
! * Returns an unmodifiable <code>List</code> that represents the Resources
! * section of this target. Each entry in the <code>List</code> is
! * another <code>List</code> that represents the Resource section. In turn,
! * each of these <code>List</code>s contains <code>TargetMatch</code>
! * objects that represent ResourceMatch XML structures.
! * <p>
! * Note that future versions of this code may use intermediary classes to
! * make the structure clearer, but this depends on the future structure
! * of XACML Targets.
! *
! * @return the matching elements or null of the match is any
! */
! public List getResources() {
! return resources;
! }
!
! /**
! * Returns an unmodifiable <code>List</code> that represents the Actions
! * section of this target. Each entry in the <code>List</code> is
! * another <code>List</code> that represents the Action section. In turn,
! * each of these <code>List</code>s contains <code>TargetMatch</code>
! * objects that represent ActionMatch XML structures.
! * <p>
! * Note that future versions of this code may use intermediary classes to
! * make the structure clearer, but this depends on the future structure
! * of XACML Targets.
! *
! * @return the matching elements or null of the match is any
! */
! public List getActions() {
! return actions;
}
Index: TargetMatch.java
===================================================================
RCS file: /cvsroot/sunxacml/sunxacml/com/sun/xacml/TargetMatch.java,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** TargetMatch.java 13 Feb 2003 22:19:10 -0000 1.1.1.1
--- TargetMatch.java 29 Jul 2003 22:01:46 -0000 1.2
***************
*** 213,216 ****
--- 213,254 ----
/**
+ * Returns the type of this <code>TargetMatch</code>, either
+ * <code>SUBJECT</code>, <code>RESOURCE</code>, or <code>ACTION</code>.
+ *
+ * @return the type
+ */
+ public int getType() {
+ return type;
+ }
+
+ /**
+ * Returns the <code>Function</code> used to do the matching.
+ *
+ * @return the match function
+ */
+ public Function getMatchFunction() {
+ return function;
+ }
+
+ /**
+ * Returns the <code>AttributeValue</code> used by the matching function.
+ *
+ * @return the <code>AttributeValue</code> for the match
+ */
+ public AttributeValue getMatchValue() {
+ return attrValue;
+ }
+
+ /**
+ * Returns the <code>AttributeDesignator</code> or
+ * <code>AttributeSelector</code> used by the matching function.
+ *
+ * @return the designator or selector for the match
+ */
+ public Evaluatable getMatchEvaluatable() {
+ return eval;
+ }
+
+ /**
* Determines whether this <code>TargetMatch</code> matches
* the input request (whether it is applicable)
|