|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.gcube.common.core.utils.handlers.GCUBEServiceClientImpl
org.gcube.common.core.state.GCUBEStatefulResource<org.gcube.common.core.state.GCUBEWSResourceKey>
org.gcube.common.core.state.GCUBEWSResource
org.gcube.indexmanagement.common.IndexWSResource
public abstract class IndexWSResource
| Nested Class Summary | |
|---|---|
static class |
IndexWSResource.DestructionMode
The two possible modes of index resource destruction: FULL_DESTRUCTION: Remove the resource and perform full clean-up of any objects created by it (e.g. |
| Nested classes/interfaces inherited from class org.gcube.common.core.state.GCUBEStatefulResource |
|---|
org.gcube.common.core.state.GCUBEStatefulResource.LOCK, org.gcube.common.core.state.GCUBEStatefulResource.TaskContext |
| Field Summary | |
|---|---|
protected boolean |
bInitializing
Is the resource in the initialization state or not? |
protected IndexWSResource.DestructionMode |
destructionMode
The resource's destruction mode |
protected Object |
initLock
The corresponding lock Object |
protected String |
namespace
The service's namespace |
protected List<String> |
propNames
The list of property names for this resource |
static String |
RP_COLLECTION_ID
|
static String |
RP_CREATED
|
static String |
RP_FIELDS
|
static String |
RP_INDEX_ID
The list of standard resource properties defined by every index resource |
static String |
RP_INDEX_TYPE_NAME
|
static String |
RP_MODIFIED
|
protected org.gcube.indexmanagement.common.IndexWSResource.TopicRegistrar |
topicRegistrar
The object that handles the registration of notification topics |
| Fields inherited from class org.gcube.common.core.state.GCUBEStatefulResource |
|---|
uuidGen |
| Constructor Summary | |
|---|---|
protected |
IndexWSResource()
Constructs a new IndexWSResource object. |
| Method Summary | |
|---|---|
void |
addCollectionID(String collectionID)
Adds a collection id to the collectionID resource property |
void |
addField(String field)
Adds a field to the Fields resource property |
org.globus.wsrf.ResourceProperty |
createProperty(String propName)
Adds a new ResourceProperty to the resource, given a property name. |
org.globus.wsrf.ResourceProperty |
createProperty(String propName,
String nameSpace)
Adds a new ResourceProperty to the resource, given a property name and a namespace. |
org.globus.wsrf.impl.SimpleTopic |
createTopic(String topicName)
Adds a new topic to the resource, given a topic name. |
org.globus.wsrf.impl.SimpleTopic |
createTopic(String topicName,
String nameSpace)
Adds a new topic to the resource, given a topic name and a namespace. |
protected void |
filterFieldInfo(ArrayList<String> presentableFields,
ArrayList<String> searchableFields)
|
String[] |
getCollectionID()
Getter method for the CollectionID list Resource Property |
Calendar |
getCreated()
Getter method for the Created Resource Property |
IndexWSResource.DestructionMode |
getDestructionMode()
Returns the resource's destruction mode |
String[] |
getFields()
Getter method for the Fields list Resource Property |
String |
getIndexID()
Getter method for the IndexID Resource Property |
String |
getIndexTypeName()
Getter method for the IndexTypeName Resource Property |
Calendar |
getModified()
Getter method for the Modified Resource Property |
String |
getNamespace()
Returns the namespace of the service this resource belongs to |
protected String[] |
getPropertyNames()
|
void |
initialise(String namespace,
String indexID,
String indexTypeName,
String[] collectionID)
Initializes a IndexWSResource object. |
boolean |
isInitializing()
Returns the current initialization state of the resource |
boolean |
isTopicRegistered(org.globus.wsrf.impl.SimpleTopic topic)
Checks if the registration of the given topic has been completed. |
protected void |
onLoad(ObjectInputStream ois,
boolean firstLoad)
Invoked when a resource is being created from a serialized, previously saved state. |
void |
onResourceRemoval()
Performs clean-up operations before the resource is removed from the home |
protected void |
onStore(ObjectOutputStream oos)
Invoked when the state of the resource must be saved (resource serialization) |
void |
publish(org.gcube.common.core.scope.GCUBEScope... scopes)
|
void |
setCollectionID(String[] collectionIDs)
Setter method for the CollectionID list Resource Property |
void |
setCreated(Calendar created)
Setter method for the Created Resource Property |
void |
setDestructionMode(IndexWSResource.DestructionMode mode)
Sets the resource's destruction mode |
void |
setFields(String[] fields)
Setter method for the Fields list Resource Property |
void |
setIndexID(String indexID)
Setter method for the IndexID Resource Property |
void |
setIndexTypeName(String indexTypeName)
Setter method for the IndexTypeName Resource Property |
void |
setIsInitializing(boolean isInitializing)
Specifies the current state of the resource (initializing or not) |
void |
setModified(Calendar modified)
Setter method for the Modified Resource Property |
void |
store()
|
protected void |
waitUntilInitialized()
Blocks thread execution until WS resource is initialized |
| Methods inherited from class org.gcube.common.core.state.GCUBEWSResource |
|---|
getCurrentTime, getEPR, getPorttypeContext, getProperty, getPublisher, getResourcePropertySet, getServiceContext, getTerminationTime, getTopicList, getTopicNames, initialise, initialise, initialiseContainers, inScope, load, setPortTypeContext, setTerminationTime, unpublish |
| Methods inherited from class org.gcube.common.core.state.GCUBEStatefulResource |
|---|
getID, getLock, getScheduledTasks, getScope, launchTask, onRemove, setID, setPersistenceDelegate, stopTask |
| Methods inherited from class org.gcube.common.core.utils.handlers.GCUBEServiceClientImpl |
|---|
getPortTypeMap, setPortTypeMap |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String RP_INDEX_ID
public static final String RP_INDEX_TYPE_NAME
public static final String RP_COLLECTION_ID
public static final String RP_FIELDS
public static final String RP_MODIFIED
public static final String RP_CREATED
protected List<String> propNames
protected String namespace
protected boolean bInitializing
protected Object initLock
protected org.gcube.indexmanagement.common.IndexWSResource.TopicRegistrar topicRegistrar
protected IndexWSResource.DestructionMode destructionMode
| Constructor Detail |
|---|
protected IndexWSResource()
| Method Detail |
|---|
public void initialise(String namespace,
String indexID,
String indexTypeName,
String[] collectionID)
throws Exception
Exception
protected void onLoad(ObjectInputStream ois,
boolean firstLoad)
throws Exception
ois - the input stream through which the state can be readindicates - if the resource is being loaded for the first time (hard load) or not (soft load)
Exception - an error occured during resource deserialization
protected void onStore(ObjectOutputStream oos)
throws Exception
oos - the output stream to write the resource state to
Exception - an error occured during resource serializationpublic void store()
store in interface org.globus.wsrf.PersistenceCallbackstore in class org.gcube.common.core.state.GCUBEStatefulResource<org.gcube.common.core.state.GCUBEWSResourceKey>
public org.globus.wsrf.ResourceProperty createProperty(String propName)
throws Exception
propName - the name of the new resource property
Exception
public org.globus.wsrf.ResourceProperty createProperty(String propName,
String nameSpace)
throws Exception
propName - the name of the new resource propertynameSpace - the namespace of the new resource property
Exception
public org.globus.wsrf.impl.SimpleTopic createTopic(String topicName,
String nameSpace)
throws Exception
topicName - the name of the new topicnameSpace - the namespace of the new topic
Exception
public org.globus.wsrf.impl.SimpleTopic createTopic(String topicName)
throws Exception
topicName - the name of the new topic
Exceptionprotected String[] getPropertyNames()
getPropertyNames in class org.gcube.common.core.state.GCUBEWSResourcepublic String getNamespace()
public String getIndexID()
String the requested indexIDpublic void setIndexID(String indexID)
indexID - String the new IndexIdpublic String[] getCollectionID()
String[] the requested CollectionIDspublic String[] getFields()
String[] the requested Fields
public void setCollectionID(String[] collectionIDs)
throws Exception
String[] - the new CollectionIDs
Exception
public void setFields(String[] fields)
throws Exception
String[] - the new Fields
Exceptionpublic void addCollectionID(String collectionID)
collectionID - String -the ID to be addedpublic void addField(String field)
field - String -the field to be added in the following format:
[collectionID]:[language]:["s"|"p"]:[fieldName]public String getIndexTypeName()
String the requested IndexTypeName
public void setIndexTypeName(String indexTypeName)
throws Exception
indexTypeName - String the new IndexTypeName
Exceptionpublic Calendar getCreated()
Calendar the requested time of creation for this index replicationpublic void setCreated(Calendar created)
created - Calendar representation of the time the resource was created.public Calendar getModified()
Calendar the requested lastModified indicatorpublic void setModified(Calendar modified)
modified - Calendar representation of the time the resource was modifiedpublic boolean isInitializing()
public void setIsInitializing(boolean isInitializing)
isInitializing - the initialization state to setprotected void waitUntilInitialized()
protected void filterFieldInfo(ArrayList<String> presentableFields,
ArrayList<String> searchableFields)
public IndexWSResource.DestructionMode getDestructionMode()
public void setDestructionMode(IndexWSResource.DestructionMode mode)
mode - the destruction mode to be setpublic void onResourceRemoval()
public void publish(org.gcube.common.core.scope.GCUBEScope... scopes)
throws org.globus.wsrf.ResourceException
publish in class org.gcube.common.core.state.GCUBEWSResourceorg.globus.wsrf.ResourceException
public boolean isTopicRegistered(org.globus.wsrf.impl.SimpleTopic topic)
throws Exception
topic - the topic whose registration to check
Exception
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||