MicroTAPAS
Class RepertoireBase

java.lang.Object
  |
  +--MicroTAPAS.RepertoireBase
All Implemented Interfaces:
java.io.Serializable

public class RepertoireBase
extends java.lang.Object
implements java.io.Serializable

Implementation of the repertoire base service, Director has an instance of it

See Also:
Serialized Form

Field Summary
private  java.util.Hashtable playInstances
          To store active plays along with their manuscripts
 
Constructor Summary
RepertoireBase()
          Constructor to fill data field values
 
Method Summary
 boolean empty()
          Simple utility to check if the numer of active Plays are zero
 Item listPlays()
          Utility to list all active Plays for Debug purposes
 Play playPluggedIn(java.lang.String pPlayId, java.lang.String pPlayVer)
          Looks up a specified version of a specified play among the active plays
 RequestResult playPlugIn(Play pPlay, long id)
          Inserts a specified Play into the RepertoireBase if not already there
 RequestResult playPlugOut(java.lang.String pPlayId, java.lang.String pPlayVer, long id)
          Removes a specified or all versions of a specified Play from the RepertoireBase if it was there
 Play[] playsPluggedIn(java.lang.String pPlayId)
          Looks up all versions of a specified play among the active plays
 Play validRole(java.lang.String pRole)
          Checks validity of a specified Role by finding the corresponding Play for it
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

playInstances

private java.util.Hashtable playInstances
To store active plays along with their manuscripts

Constructor Detail

RepertoireBase

public RepertoireBase()
Constructor to fill data field values

Method Detail

playPluggedIn

public Play playPluggedIn(java.lang.String pPlayId,
                          java.lang.String pPlayVer)
Looks up a specified version of a specified play among the active plays

Parameters:
pPlayId - Play identifier of the play to be found
pPlayVer - Play version of the play to be found
Returns:
The play that was found

playsPluggedIn

public Play[] playsPluggedIn(java.lang.String pPlayId)
Looks up all versions of a specified play among the active plays

Parameters:
pPlayId - Play identifier of the play of which all versions to be found
Returns:
Array of plays that were found

playPlugIn

public RequestResult playPlugIn(Play pPlay,
                                long id)
                         throws java.lang.Exception
Inserts a specified Play into the RepertoireBase if not already there

Parameters:
pPlay - The Play to be inserted
Returns:
PaP style result of the operation
java.lang.Exception

playPlugOut

public RequestResult playPlugOut(java.lang.String pPlayId,
                                 java.lang.String pPlayVer,
                                 long id)
                          throws java.lang.Exception
Removes a specified or all versions of a specified Play from the RepertoireBase if it was there

Parameters:
pPlayId - Identifier of the Play to be removed
pPlayVer - Version of the Play to be removed, null means all versions of the Play to be removed
Returns:
PaP style result of the operation
java.lang.Exception

validRole

public Play validRole(java.lang.String pRole)
Checks validity of a specified Role by finding the corresponding Play for it

Parameters:
pRole - Role to look up corresponding Play for
Returns:
Corresponding PlayId for the Role, null if the specifeid role is not valid, i.e. no active play has it NOTE: The procedure for selection among versions within plays is not implemented(?).

empty

public boolean empty()
Simple utility to check if the numer of active Plays are zero

Returns:
true if there are no active Plays

listPlays

public Item listPlays()
Utility to list all active Plays for Debug purposes



The Telematics Architecture for Plug-and-Play Systems (TAPAS) is a research project undertaken by the Norwegian University of Science and Technology's Telematics department which aims at developing an architecture for network-based service systems with a) flexibility and adaptability, b) robustness and survivability, and c) QoS awareness and resource control.

More information can be found at the project's homepage at http://tapas.item.ntnu.no and the project manager, Professor Finn Arve Aagesen, can be reached at finn.arve.aagesen@item.ntnu.no.