org.enhydra.shark.partmappersistence
Class DODSParticipantMappingAdmin

java.lang.Object
  extended byorg.enhydra.shark.partmappersistence.DODSParticipantMappingAdmin
All Implemented Interfaces:
ParticipantMappingManager, ParticipantMappingManagerAdmin

public class DODSParticipantMappingAdmin
extends java.lang.Object
implements ParticipantMappingManagerAdmin

Implementation of ParticipantMappingsManager interface

Author:
Zoran Milakovic

Field Summary
protected static com.lutris.appserver.server.sql.LogicalDatabase db
           
static java.lang.String LDB_PARAM_NAME
           
 
Constructor Summary
DODSParticipantMappingAdmin()
           
 
Method Summary
 boolean checkValidity(ParticipantMap pm)
           
 void configure(CallbackUtilities cus)
           
 ParticipantMap createParticipantMap()
          Method createParticipantMap create new ParticipantMap object.
 boolean deleteParticipantMapping(ParticipantMap pm)
          Delete specified ParticipantMap from database.
 boolean deleteParticipantMappings(java.lang.String packageId, java.lang.String packageVersion, java.lang.String processDefinitionId, java.lang.String participantId)
          Method deleteParticipantMappings delete participant mappings for specified parameters.
 boolean deleteParticipantMappingsForUserOrGroup(java.lang.String userOrGroupName)
          Method deleteParticipantMappings delete participant mappings for specified parameters.
 boolean doesParticipantMappingExist(ParticipantMap pm)
          Check if specified participant map exist in database.
 ParticipantMap[] getAllParticipantMappings()
          Gets all ParticipantMappings from database.
protected  com.lutris.appserver.server.sql.DBTransaction getDBTransaction()
           
 ParticipantMap[] getParticipantMappings(WMSessionHandle shandle, java.lang.String packageId, java.lang.String packageVer, java.lang.String processDefinitionId, java.lang.String participantId)
          Gets all participant mappings for specified parameters.
protected  void refreshDOCaches()
           
 boolean saveParticipantMapping(ParticipantMap pm)
          Save new ParticipantMap to database.
protected  void setLDBName()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LDB_PARAM_NAME

public static final java.lang.String LDB_PARAM_NAME
See Also:
Constant Field Values

db

protected static com.lutris.appserver.server.sql.LogicalDatabase db
Constructor Detail

DODSParticipantMappingAdmin

public DODSParticipantMappingAdmin()
Method Detail

configure

public void configure(CallbackUtilities cus)
               throws java.lang.Exception
Specified by:
configure in interface ParticipantMappingManager
Throws:
java.lang.Exception

saveParticipantMapping

public boolean saveParticipantMapping(ParticipantMap pm)
                               throws java.lang.Exception
Save new ParticipantMap to database.

Specified by:
saveParticipantMapping in interface ParticipantMappingManagerAdmin
Parameters:
pm - ParticipantMap to save
Returns:
boolean true if everything is ok, false otherwise
Throws:
java.lang.Exception - Exception will be thrown if error occur.

deleteParticipantMapping

public boolean deleteParticipantMapping(ParticipantMap pm)
                                 throws java.lang.Exception
Delete specified ParticipantMap from database.

Specified by:
deleteParticipantMapping in interface ParticipantMappingManagerAdmin
Parameters:
pm - ParticipantMap to delete
Returns:
boolean true if everything is ok, false otherwise
Throws:
java.lang.Exception - Exception will be thrown if error occur.

doesParticipantMappingExist

public boolean doesParticipantMappingExist(ParticipantMap pm)
                                    throws java.lang.Exception
Check if specified participant map exist in database.

Specified by:
doesParticipantMappingExist in interface ParticipantMappingManagerAdmin
Parameters:
pm - ParticipantMap to delete
Returns:
boolean true if everything is ok, false otherwise
Throws:
java.lang.Exception - Exception will be thrown if error occur.

getAllParticipantMappings

public ParticipantMap[] getAllParticipantMappings()
                                           throws java.lang.Exception
Gets all ParticipantMappings from database.

Specified by:
getAllParticipantMappings in interface ParticipantMappingManagerAdmin
Returns:
List List with participant mappings.
Throws:
java.lang.Exception - Exception will be thrown if error occur.

createParticipantMap

public ParticipantMap createParticipantMap()
Method createParticipantMap create new ParticipantMap object.

Specified by:
createParticipantMap in interface ParticipantMappingManagerAdmin
Returns:
a ParticipantMap

getParticipantMappings

public ParticipantMap[] getParticipantMappings(WMSessionHandle shandle,
                                               java.lang.String packageId,
                                               java.lang.String packageVer,
                                               java.lang.String processDefinitionId,
                                               java.lang.String participantId)
                                        throws java.lang.Exception
Gets all participant mappings for specified parameters.

Specified by:
getParticipantMappings in interface ParticipantMappingManager
Throws:
java.lang.Exception

deleteParticipantMappings

public boolean deleteParticipantMappings(java.lang.String packageId,
                                         java.lang.String packageVersion,
                                         java.lang.String processDefinitionId,
                                         java.lang.String participantId)
                                  throws java.lang.Exception
Method deleteParticipantMappings delete participant mappings for specified parameters.

Specified by:
deleteParticipantMappings in interface ParticipantMappingManagerAdmin
Parameters:
packageId - Package id
processDefinitionId - Process id
participantId - Participant id
Returns:
boolean true if OK, false otherwise
Throws:
java.lang.Exception - Exception will be thrown if error occur.

deleteParticipantMappingsForUserOrGroup

public boolean deleteParticipantMappingsForUserOrGroup(java.lang.String userOrGroupName)
                                                throws java.lang.Exception
Method deleteParticipantMappings delete participant mappings for specified parameters.

Specified by:
deleteParticipantMappingsForUserOrGroup in interface ParticipantMappingManagerAdmin
Parameters:
userOrGroupName - user or a group name
Returns:
boolean true if everything is OK, false otherwise
Throws:
java.lang.Exception - Exception will be thrown if error occur.

checkValidity

public boolean checkValidity(ParticipantMap pm)

getDBTransaction

protected com.lutris.appserver.server.sql.DBTransaction getDBTransaction()
                                                                  throws java.lang.Exception
Throws:
java.lang.Exception

setLDBName

protected void setLDBName()

refreshDOCaches

protected void refreshDOCaches()
                        throws java.lang.Exception
Throws:
java.lang.Exception