public static Subject createAMIdentitySubject(PolicyManager pm,AMIdentity user) throws PolicyException {
  SubjectTypeManager mgr=pm.getSubjectTypeManager();
  Subject subject=mgr.getSubject("AMIdentitySubject");
  Set<String> set=new HashSet<String>();
  set.add(user.getUniversalId());
  subject.setValues(set);
  return subject;
}

public static Subject createAMIdentitySubject ( PolicyManager pm , AMIdentity user ) throws PolicyException { SubjectTypeManager mgr = pm . getSubjectTypeManager ( ) ; Subject subject = mgr . getSubject ( "AMIdentitySubject" ) ; Set < String > set = new HashSet < String > ( ) ; set . add ( user . getUniversalId ( ) ) ; subject . setValues ( set ) ; return subject ; }
returns a subject for the given amidentity .
