public GenericPrincipal(String userName,String password,List<String> roles,Map<String,List<GenericPrincipal.Attribute>> writeEntries,Map<String,List<GenericPrincipal.Attribute>> readEntries,Map<String,List<GenericPrincipal.Attribute>> executeTasks){
  this.userName=userName;
  this.password=password;
  this.writeEntries=writeEntries;
  this.readEntries=readEntries;
  this.executeTasks=executeTasks;
  if (roles != null) {
    this.roles=new String[roles.size()];
    this.roles=roles.toArray(this.roles);
    if (this.roles.length > 0)     Arrays.sort(this.roles);
  }
  writeMatchObjects=new HashMap<String,MatchObject>();
  readMatchObjects=new HashMap<String,MatchObject>();
  executeMatchObjects=new HashMap<String,MatchObject>();
  userDefinedRoles=new ArrayList<String>();
}

public GenericPrincipal ( String userName , String password , List < String > roles , Map < String , List < GenericPrincipal . Attribute > > writeEntries , Map < String , List < GenericPrincipal . Attribute > > readEntries , Map < String , List < GenericPrincipal . Attribute > > executeTasks ) { this . userName = userName ; this . password = password ; this . writeEntries = writeEntries ; this . readEntries = readEntries ; this . executeTasks = executeTasks ; if ( roles != null ) { this . roles = new String [ roles . size ( ) ] ; this . roles = roles . toArray ( this . roles ) ; if ( this . roles . length > 0 ) Arrays . sort ( this . roles ) ; } writeMatchObjects = new HashMap < String , MatchObject > ( ) ; readMatchObjects = new HashMap < String , MatchObject > ( ) ; executeMatchObjects = new HashMap < String , MatchObject > ( ) ; userDefinedRoles = new ArrayList < String > ( ) ; }
construct a new principal for the specified username and password , with the specified role names ( as strings ) .
