Class[] attrClasses = new Class[1];
/**
- * Sole constructor. Takes a directory name in the local file system
+ * Sole constructor. Takes a jarfile name in the local file system
* where attribute classes reside
*/
this.arpFactory = arpFactory;
adminArp = arpFactory.getInstance("admin", true);
if(adminArp.isNew())
- throw new AAException("Admin Arp not found! ");
+ throw new AAException("Admin Arp not found in "+arpFactory);
this.ctx = ctx;
this.domain = domain;
}
public Arp getInstance(String arpName, boolean isAdmin)
throws AAException{
try{
+
String fileName = dataStore+System.getProperty("file.separator")+arpName;
+ System.out.println("Looking for ARP "+fileName);
FileInputStream f = new FileInputStream(fileName);
ObjectInput s = new ObjectInputStream(f);
throw new AAException("Wrong ARP name. ARP maybe renamed in datastore. ");
arp.setNew(false);
arp.setLastRead(new Date());
+ System.out.println("Found and using ARP "+arpName);
return arp;
}catch(FileNotFoundException e){
// check the IO error to make sure "file not found"
+ System.out.println("Got File Not Found for "+arpName+" in "+dataStore);
try{
Arp arp = new Arp(arpName, isAdmin);
arp.setNew(true);
throw new AAException("IO Problem:"+e);
}
}
+
+ public String toString(){
+ return "ArpFileFactory:dir="+dataStore;
+ }
}
+package edu.internet2.middleware.shibboleth.aaLocal;
+
import java.util.Hashtable;
import javax.naming.*;
import javax.naming.spi.*;
+package edu.internet2.middleware.shibboleth.aaLocal;
+
import java.util.*;
import javax.naming.*;
import javax.naming.directory.*;
+package edu.internet2.middleware.shibboleth.aaLocal;
+
import java.util.Hashtable;
import javax.naming.*;
import javax.naming.spi.*;
+package edu.internet2.middleware.shibboleth.aaLocal;
+
import java.util.*;
import javax.naming.*;
import javax.naming.directory.*;
+package edu.internet2.middleware.shibboleth.aaLocal;
+
import java.util.Hashtable;
import javax.naming.*;
import javax.naming.spi.*;
+package edu.internet2.middleware.shibboleth.aaLocal;
+
import java.util.*;
import java.sql.*;
import javax.naming.*;
import edu.internet2.middleware.eduPerson.*;
-import edu.internet2.middleware.shibboleth.Constants;
+import edu.internet2.middleware.shibboleth.common.Constants;
import org.opensaml.*;
public cmuAndrewId(String[] scopes, Object[] values)
throws SAMLException{
- this.super("urn:mace:eduPerson:1.0:eduPersonPrincipalName",
+ super("urn:mace:eduPerson:1.0:eduPersonPrincipalName",
Constants.SHIB_ATTRIBUTE_NAMESPACE_URI,
new QName("urn:mace:eduPerson:1.0",
"eduPersonPrincipalNameType"),
import edu.internet2.middleware.eduPerson.*;
-import edu.internet2.middleware.shibboleth.Constants;
+import edu.internet2.middleware.shibboleth.common.Constants;
import org.opensaml.*;
public class eduPersonAffiliation extends ScopedAttribute{
public eduPersonAffiliation(String[] scopes, Object[] values)
throws SAMLException{
- this.super("urn:mace:eduPerson:1.0:eduPersonAffiliation",
+ super("urn:mace:eduPerson:1.0:eduPersonAffiliation",
Constants.SHIB_ATTRIBUTE_NAMESPACE_URI,
new QName("urn:mace:eduPerson:1.0",
"eduPersonAffiliationType"),
scopes[0],
scopes);
- for(int i=0; i<super.values.length; i++){
- String val = (String)super.values[i];
+ for(int i=0; i<values.length; i++){
+ String val = (String)values[i];
if(val.equalsIgnoreCase("faculty") ||
val.equalsIgnoreCase("student") ||
val.equalsIgnoreCase("staff") ||
val.equalsIgnoreCase("member") ||
val.equalsIgnoreCase("affiliate") ||
val.equalsIgnoreCase("employee") )
- super.values[i] = val.toLowerCase();
+ values[i] = val.toLowerCase();
else
- super.values[i] = "member";
+ values[i] = "member";
}
}
import edu.internet2.middleware.eduPerson.*;
-import edu.internet2.middleware.shibboleth.Constants;
+import edu.internet2.middleware.shibboleth.common.Constants;
import org.opensaml.*;
public class eduPersonPrincipalName extends ScopedAttribute{
public eduPersonPrincipalName(String[] scopes, Object[] values)
throws SAMLException{
- this.super("urn:mace:eduPerson:1.0:eduPersonPrincipalName",
+ super("urn:mace:eduPerson:1.0:eduPersonPrincipalName",
Constants.SHIB_ATTRIBUTE_NAMESPACE_URI,
new QName("urn:mace:eduPerson:1.0",
"eduPersonPrincipalNameType"),
scopes);
if(((String)values[0]).indexOf("@") < 0)
- super.values[0] = (String)values[0]+"@"+scopes[0];
+ values[0] = (String)values[0]+"@"+scopes[0];
}
}