Update of /cvsroot/sunxacml/sunxacml/com/sun/xacml
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31765/com/sun/xacml
Modified Files:
AbstractPolicy.java Obligation.java TargetMatch.java
Log Message:
updated to use new factory interfaces
Index: AbstractPolicy.java
===================================================================
RCS file: /cvsroot/sunxacml/sunxacml/com/sun/xacml/AbstractPolicy.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** AbstractPolicy.java 7 Jan 2004 21:31:18 -0000 1.7
--- AbstractPolicy.java 13 Feb 2004 17:55:32 -0000 1.8
***************
*** 1,7 ****
/*
! * @(#)AbstractPolicy.java 1.12 01/30/03
*
! * Copyright 2003 Sun Microsystems, Inc. All Rights Reserved.
*
* Redistribution and use in source and binary forms, with or without
--- 1,7 ----
/*
! * @(#)AbstractPolicy.java
*
! * Copyright 2003-2004 Sun Microsystems, Inc. All Rights Reserved.
*
* Redistribution and use in source and binary forms, with or without
***************
*** 182,186 ****
URI algId = new URI(attrs.getNamedItem(combiningName).
getNodeValue());
! combiningAlg = CombiningAlgFactory.createCombiningAlg(algId);
} catch (Exception e) {
throw new ParsingException("Error parsing combining algorithm" +
--- 182,187 ----
URI algId = new URI(attrs.getNamedItem(combiningName).
getNodeValue());
! CombiningAlgFactory factory = CombiningAlgFactory.getInstance();
! combiningAlg = factory.createAlgorithm(algId);
} catch (Exception e) {
throw new ParsingException("Error parsing combining algorithm" +
Index: Obligation.java
===================================================================
RCS file: /cvsroot/sunxacml/sunxacml/com/sun/xacml/Obligation.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** Obligation.java 27 Oct 2003 04:44:01 -0000 1.3
--- Obligation.java 13 Feb 2004 17:55:32 -0000 1.4
***************
*** 3,7 ****
* @(#)Obligation.java
*
! * Copyright 2003 Sun Microsystems, Inc. All Rights Reserved.
*
* Redistribution and use in source and binary forms, with or without
--- 3,7 ----
* @(#)Obligation.java
*
! * Copyright 2003-2004 Sun Microsystems, Inc. All Rights Reserved.
*
* Redistribution and use in source and binary forms, with or without
***************
*** 106,109 ****
--- 106,110 ----
Set assignments = new HashSet();
+ AttributeFactory attrFactory = AttributeFactory.getInstance();
NamedNodeMap attrs = root.getAttributes();
***************
*** 140,145 ****
new URI(node.getAttributes().
getNamedItem("AttributeId").getNodeValue());
! AttributeValue attrValue =
! AttributeFactory.createAttribute(node);
assignments.add(new Attribute(attrId, null, null,
attrValue));
--- 141,145 ----
new URI(node.getAttributes().
getNamedItem("AttributeId").getNodeValue());
! AttributeValue attrValue = attrFactory.createValue(node);
assignments.add(new Attribute(attrId, null, null,
attrValue));
Index: TargetMatch.java
===================================================================
RCS file: /cvsroot/sunxacml/sunxacml/com/sun/xacml/TargetMatch.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** TargetMatch.java 29 Aug 2003 18:58:32 -0000 1.4
--- TargetMatch.java 13 Feb 2004 17:55:32 -0000 1.5
***************
*** 1,7 ****
/*
! * @(#)TargetMatch.java 1.14 01/30/03
*
! * Copyright 2003 Sun Microsystems, Inc. All Rights Reserved.
*
* Redistribution and use in source and binary forms, with or without
--- 1,7 ----
/*
! * @(#)TargetMatch.java
*
! * Copyright 2003-2004 Sun Microsystems, Inc. All Rights Reserved.
*
* Redistribution and use in source and binary forms, with or without
***************
*** 156,159 ****
--- 156,161 ----
AttributeValue attrValue = null;
+ AttributeFactory attrFactory = AttributeFactory.getInstance();
+
// first off, figure out which of three types we are
if (prefix.equals("Subject")) {
***************
*** 203,207 ****
} else if (name.equals("AttributeValue")) {
try {
! attrValue = AttributeFactory.createAttribute(node);
} catch (UnknownIdentifierException uie) {
throw new ParsingException("Unknown Attribute Type", uie);
--- 205,209 ----
} else if (name.equals("AttributeValue")) {
try {
! attrValue = attrFactory.createValue(node);
} catch (UnknownIdentifierException uie) {
throw new ParsingException("Unknown Attribute Type", uie);
|