|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--PaP.Session
The Session class contains the information about the Session for a user.
A Session has a username that identifies who the Session belongs to as well
as information about a set of actor instances that the user has plugged in.
Each actor instance contains the name of a play and the version of the play
that the Role the actor instance is playing belongs to. It also contains the
name of the actor instance, an ArrayList of all the RoleSessions of the
actor instance as well as a string defining the state of the actor instance.
The Session class contains methods for getting and setting the username,
methods for adding, finding, getting and removing actor instances, as well
as a method for getting the number of actor instances.
Field Summary | |
private java.util.ArrayList |
actorInstances
ArrayList containing all the. |
private UserProfile |
profile
The UserProfile of the user that this session belongs to. |
private java.lang.String |
username
The username of the user that this session belongs to. |
Constructor Summary | |
Session()
Creates a new Session. |
Method Summary | |
void |
addActorInstance(java.util.ArrayList instance)
Adds the specifed ArrayList to the main ArrayList. |
private int |
findActorInstance(java.lang.String play,
java.lang.String version,
java.lang.String actorname)
Searches through the main ArrayLists for an ArrayList with the same play, version and actorname as the specified play, version and actorname. |
java.util.ArrayList |
getActorInstance(int index)
Returns the ArrayList containing information about the actor instance at the specified index. |
java.util.ArrayList |
getActorInstance(java.lang.String play,
java.lang.String version,
java.lang.String actorname)
Searches through the main ArrayList for an ArrayList with the same play, version and actorname as the specified play, version and actorname. |
int |
getActorInstanceCount()
Returns the number of actor instances added to this Session. |
java.lang.String |
getUsername()
Returns the username of the user that this Session belongs to. |
UserProfile |
getUserProfile()
Return the UserProfile of the user that this Session belongs to. |
Item |
listActorInstances()
Returns the information about all the actor instances in the main ArrayList in the form of an Item. |
void |
removeActorInstance(java.lang.String play,
java.lang.String version,
java.lang.String actorname)
Searches through the main ArrayLists for an ArrayList with the same play, version and actorname as the specified play, version and actorname. |
void |
removeAll()
Removes all the actorinstances from this Session-object. |
void |
setUsername(java.lang.String name)
Sets the username of the user that this Session belongs to. |
void |
setUserProfile(UserProfile newProfile)
Sets the UserProfile of the user that this Session belongs to. |
Methods inherited from class java.lang.Object |
|
Field Detail |
private java.lang.String username
private UserProfile profile
private java.util.ArrayList actorInstances
Constructor Detail |
public Session()
Method Detail |
public void addActorInstance(java.util.ArrayList instance)
instance
- ArrayList with information about an actor instance.public java.util.ArrayList getActorInstance(int index)
index
- The index specifying the actor instance to be returned.public java.util.ArrayList getActorInstance(java.lang.String play, java.lang.String version, java.lang.String actorname)
play
- The name of the play that the Role the actor instance is
playing belongs to.version
- The version of the play.actorname
- The name of the actor instance.public int getActorInstanceCount()
public java.lang.String getUsername()
public UserProfile getUserProfile()
public Item listActorInstances()
public void removeActorInstance(java.lang.String play, java.lang.String version, java.lang.String actorname)
play
- The name of the play that the Role the actor instance is
playing belongs to.version
- The version of the play.actorname
- The name of the actor instance.public void removeAll()
public void setUsername(java.lang.String name)
name
- The new username.public void setUserProfile(UserProfile newProfile)
newProfile
- The new UserProfile.private int findActorInstance(java.lang.String play, java.lang.String version, java.lang.String actorname)
play
- The name of the play that the Role the actor instance is
playing belongs to.version
- The version of the play.actorname
- The name of the actor instance.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |