uk.ac.soton.ecs.grimoires.server.lifetime
Class LifetimeManager

java.lang.Object
  extended byuk.ac.soton.ecs.grimoires.server.lifetime.LifetimeManager
All Implemented Interfaces:
Constants

public class LifetimeManager
extends Object
implements Constants

Author:
wf

Field Summary
 
Fields inherited from interface uk.ac.soton.ecs.grimoires.server.lifetime.Constants
ArchiveTerminationAction, BusinessEntityType, CurrentTimeMetadataType, DefaultLifetimeMetadataType, DefaultLifetimeWatchIntervalMetadataType, DefaultTerminationActionMetadataType, DeleteTerminationAction, DeprecatedEntityMetadataType, DeprecatedEntityMetadataValue, DeprecateTerminationAction, FindDeprecatedEntityRDQL, FindEntityWithLifetimeRDQL, FindEntityWithTermActionRDQL, HideTerminationAction, MetadataEntityType, RecoverEntityActionMetadataType, ServiceEntityType, TerminationActionMetadataType, TerminationTimeMetadataType, ThisGrimoiresInstance, UDDIAuthInfo, UDDIGeneric
 
Constructor Summary
protected LifetimeManager()
           
 
Method Summary
 void addAutoMetadata(Vector results, EntityReference ref)
          Add automatically generated metadata to the result of Get_entityMetadata.
 void attatchDefaultTerminationTimeMetadata(String entityKey, String entityType)
          Attach a default termination time metadata to an entity.
static LifetimeManager getInstance()
          This must be synchronized.
 boolean isEntityDeprecated(String entityKey)
           
static boolean isTerminationActionValid(String action)
          Check whether the action is a valid termination action.
 void onMetadataType(EntityReference entity, Metadata metadata)
          Perform the actions triggered by the type of the metadata on attaching a metadata to an entity.
 void publishGrimoiresService()
          Publish a service representing this Grimoires instance.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LifetimeManager

protected LifetimeManager()
Method Detail

publishGrimoiresService

public void publishGrimoiresService()
Publish a service representing this Grimoires instance. It has metadata attached to express the Grimoires' configuration and policy.


getInstance

public static LifetimeManager getInstance()
This must be synchronized. There should be only one instance of LifetimeManager. There will be multiple web service container threads invoking the metadata handler, then using this lifetime manager.

Returns:

onMetadataType

public void onMetadataType(EntityReference entity,
                           Metadata metadata)
Perform the actions triggered by the type of the metadata on attaching a metadata to an entity.

Parameters:
entity -
metadata -
Throws:
Exception

attatchDefaultTerminationTimeMetadata

public void attatchDefaultTerminationTimeMetadata(String entityKey,
                                                  String entityType)
Attach a default termination time metadata to an entity. An entity could be a service or a business. This method is invoked in the UDDI publish service/business operations to automatically attach a default termination time metadata.

Parameters:
entityKey -
entityType -

addAutoMetadata

public void addAutoMetadata(Vector results,
                            EntityReference ref)
Add automatically generated metadata to the result of Get_entityMetadata.

Parameters:
results - A vector of MetadataInfo.
ref - The entity reference.

isTerminationActionValid

public static boolean isTerminationActionValid(String action)
Check whether the action is a valid termination action.

Parameters:
action - a termination action

isEntityDeprecated

public boolean isEntityDeprecated(String entityKey)