edu.internet2.middleware.grouper.rules
Class RuleSubjectActAs

java.lang.Object
  extended by edu.internet2.middleware.grouper.rules.RuleSubjectActAs

public class RuleSubjectActAs
extends Object

definition for the subject act as for a rule

Author:
mchyzer

Field Summary
static String ACT_AS_SEPARATOR
          when packing things in a single param, this is the separator
 
Constructor Summary
RuleSubjectActAs()
           
RuleSubjectActAs(String subjectId, String sourceId, String subjectIdentifier)
           
 
Method Summary
static void actAsThreadLocalAssign(edu.internet2.middleware.subject.Subject subject)
          clear act as thread local
static void actAsThreadLocalClear()
          clear act as thread local
static boolean allowedToActAs(RuleDefinition ruleDefinition, edu.internet2.middleware.subject.Subject subject, edu.internet2.middleware.subject.Subject subjectToActAs)
          see if a subject can act as another subject
 String getSourceId()
          source id to act as
 String getSubjectId()
          subject id to act as
 String getSubjectIdentifier()
          subject identifier to act as
 void setSourceId(String sourceId1)
          source id to act as
 void setSubjectId(String subjectId1)
          subject id to act as
 void setSubjectIdentifier(String subjectIdentifier1)
          subject identifier to act as
 edu.internet2.middleware.subject.Subject subject(boolean exceptionIfNotFound)
          resolve the subject
 String toString()
           
 String validate(RuleDefinition ruleDefinition)
          validate this
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ACT_AS_SEPARATOR

public static final String ACT_AS_SEPARATOR
when packing things in a single param, this is the separator

See Also:
Constant Field Values
Constructor Detail

RuleSubjectActAs

public RuleSubjectActAs(String subjectId,
                        String sourceId,
                        String subjectIdentifier)
Parameters:
subjectId -
sourceId -
subjectIdentifier -

RuleSubjectActAs

public RuleSubjectActAs()
Method Detail

getSubjectId

public String getSubjectId()
subject id to act as

Returns:
subject id to act as

setSubjectId

public void setSubjectId(String subjectId1)
subject id to act as

Parameters:
subjectId1 -

getSourceId

public String getSourceId()
source id to act as

Returns:
source id to act as

setSourceId

public void setSourceId(String sourceId1)
source id to act as

Parameters:
sourceId1 -

getSubjectIdentifier

public String getSubjectIdentifier()
subject identifier to act as

Returns:
subject id to act as

setSubjectIdentifier

public void setSubjectIdentifier(String subjectIdentifier1)
subject identifier to act as

Parameters:
subjectIdentifier1 -

toString

public String toString()
Overrides:
toString in class Object
See Also:
Object.toString()

subject

public edu.internet2.middleware.subject.Subject subject(boolean exceptionIfNotFound)
resolve the subject

Parameters:
exceptionIfNotFound - true if exception if not found
Returns:
the subject

actAsThreadLocalClear

public static void actAsThreadLocalClear()
clear act as thread local


actAsThreadLocalAssign

public static void actAsThreadLocalAssign(edu.internet2.middleware.subject.Subject subject)
clear act as thread local


validate

public String validate(RuleDefinition ruleDefinition)
validate this

Parameters:
ruleDefinition -
Returns:
error or null if ok

allowedToActAs

public static boolean allowedToActAs(RuleDefinition ruleDefinition,
                                     edu.internet2.middleware.subject.Subject subject,
                                     edu.internet2.middleware.subject.Subject subjectToActAs)
see if a subject can act as another subject

Parameters:
ruleDefinition -
subject -
subjectToActAs -
Returns:
true if a subject can act as another subject