org.gcube.portlets.admin.forwardindexportlet.gwt.server
Class ManagementServiceImpl

java.lang.Object
  extended by javax.servlet.GenericServlet
      extended by javax.servlet.http.HttpServlet
          extended by com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet
              extended by com.google.gwt.user.server.rpc.RemoteServiceServlet
                  extended by org.gcube.portlets.admin.forwardindexportlet.gwt.server.ManagementServiceImpl
All Implemented Interfaces:
com.google.gwt.user.client.rpc.RemoteService, com.google.gwt.user.server.rpc.SerializationPolicyProvider, Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig, ManagementService

public class ManagementServiceImpl
extends com.google.gwt.user.server.rpc.RemoteServiceServlet
implements ManagementService

A RemoteService implementation for the ManagementService following GWT RPC design. Used in order to communicate with Management Resources and for Management related queries towards DIS

See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet
perThreadRequest, perThreadResponse
 
Constructor Summary
ManagementServiceImpl()
          Class constructor
 
Method Summary
 String createIndex(String indexID, String collectionID, String[] keyNames, String[] indexTypeIDs, String RIEPR)
          Creates a new Index for a specified collection
 void deleteIndexType(IndexTypeBean idxType)
          Deletes an indexType from the IS.
 Map<String,IndexTypeBean> getAllIndexTypes()
          Retrieves all the indexType descriptions from the IS.
 List<ForwardIndexTypeBean> getAvailableIndexTypeIDs()
          A method to get FullTextIndexTypeBeans for every fulltext index type available in the VO
 List<CollectionBean> getCollections()
          A method to get all collection beans of collections gathered from DIS (real collections) along with all collection beans of collectionIDs indices are stated to belong to (in their collectionID property) but which do not exist in reality (fake collections)
 IndexBean[] getIndices(String collectionID)
          A method to get IndexBeans for every Index connected to a specific Collection
 MgmtPropertiesBean getResourceProperties(String indexID)
          A method used to get information about the ResourceProperties of an Index
 List<RunningInstanceBean> getRunningInstances()
          A method to get all the available FullTextIndexManagement service running instances
 List<String> query(String queryString, String indexID)
           
 Integer removeIndex(String indexID)
          Removes/destroys an Index
 String saveIndexType(IndexTypeBean idxType)
          Saves an indexType to the IS.
 String updateIndex(String indexID, String rsLocator)
           
 
Methods inherited from class com.google.gwt.user.server.rpc.RemoteServiceServlet
checkPermutationStrongName, doGetSerializationPolicy, getSerializationPolicy, onAfterResponseSerialized, onBeforeRequestDeserialized, processCall, processPost, shouldCompressResponse
 
Methods inherited from class com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet
doPost, doUnexpectedFailure, getPermutationStrongName, getThreadLocalRequest, getThreadLocalResponse, onAfterRequestDeserialized, readContent
 
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doGet, doHead, doOptions, doPut, doTrace, getLastModified, service, service
 
Methods inherited from class javax.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, init, log, log
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ManagementServiceImpl

public ManagementServiceImpl()
Class constructor

Method Detail

getRunningInstances

public List<RunningInstanceBean> getRunningInstances()
                                              throws Exception
Description copied from interface: ManagementService
A method to get all the available FullTextIndexManagement service running instances

Specified by:
getRunningInstances in interface ManagementService
Returns:
the list of running instances
Throws:
Exception - - Server side exception as dictated by GWTs RPC framework

getCollections

public List<CollectionBean> getCollections()
                                    throws Exception
A method to get all collection beans of collections gathered from DIS (real collections) along with all collection beans of collectionIDs indices are stated to belong to (in their collectionID property) but which do not exist in reality (fake collections)

Specified by:
getCollections in interface ManagementService
Returns:
- a List of the requested CollectionsByNameBeans containing the Collection information along with Index information (in the for of IndexBeans) for all indices under each collection.
Throws:
Exception - - Server side exception as dictated by GWTs RPC framework

getIndices

public IndexBean[] getIndices(String collectionID)
                       throws Exception
A method to get IndexBeans for every Index connected to a specific Collection

Specified by:
getIndices in interface ManagementService
Returns:
- an array of IndexBeans for all indices connected to the Collection
Throws:
Exception - - Server side exception as dictated by GWTs RPC framework

getAvailableIndexTypeIDs

public List<ForwardIndexTypeBean> getAvailableIndexTypeIDs()
                                                    throws Exception
Description copied from interface: ManagementService
A method to get FullTextIndexTypeBeans for every fulltext index type available in the VO

Specified by:
getAvailableIndexTypeIDs in interface ManagementService
Returns:
- the list of full text index type IDs
Throws:
Exception - - Server side exception as dictated by GWTs RPC framework

getResourceProperties

public MgmtPropertiesBean getResourceProperties(String indexID)
                                         throws Exception
A method used to get information about the ResourceProperties of an Index

Specified by:
getResourceProperties in interface ManagementService
Parameters:
indexID - - The ID of the Index of which to get the ResourceProperties
Returns:
- The resource properties for the specified Index
Throws:
Exception - - Server side exception as dictated by GWTs RPC framework

createIndex

public String createIndex(String indexID,
                          String collectionID,
                          String[] keyNames,
                          String[] indexTypeIDs,
                          String RIEPR)
                   throws Exception
Creates a new Index for a specified collection

Specified by:
createIndex in interface ManagementService
Parameters:
indexID - - The ID of the Index to be created. Null if an ID should be asigned automatically.
collectionID - - the CollectionID of the Collection the Index should belong to
keyNames - - the names of the keys of the Index to create
indexTypeIDs - - the IndexTypes of the keys of the Index to create
RIEPR - - the EPR of the Running Instance to use for the index creation
Returns:
the IndexID of the newly created Index
Throws:
Exception - - Server side exception as dictated by GWTs RPC framework

removeIndex

public Integer removeIndex(String indexID)
                    throws Exception
Removes/destroys an Index

Specified by:
removeIndex in interface ManagementService
Parameters:
indexID - - The ID of the Index to destroy
Returns:
The number of Index resources destroy
Throws:
Exception - - Server side exception as dictated by GWTs RPC framework

getAllIndexTypes

public Map<String,IndexTypeBean> getAllIndexTypes()
                                           throws Exception
Description copied from interface: ManagementService
Retrieves all the indexType descriptions from the IS.

Specified by:
getAllIndexTypes in interface ManagementService
Returns:
the indexType descriptions
Throws:
Exception - - Server side exception as dictated by GWTs RPC framework

saveIndexType

public String saveIndexType(IndexTypeBean idxType)
                     throws Exception
Description copied from interface: ManagementService
Saves an indexType to the IS.

Specified by:
saveIndexType in interface ManagementService
Parameters:
idxType - the indexType description
Returns:
the saved indexType resource ID
Throws:
Exception - - Server side exception as dictated by GWTs RPC framework

deleteIndexType

public void deleteIndexType(IndexTypeBean idxType)
                     throws Exception
Description copied from interface: ManagementService
Deletes an indexType from the IS.

Specified by:
deleteIndexType in interface ManagementService
Parameters:
idxType - the indexType description
Throws:
Exception - - Server side exception as dictated by GWTs RPC framework

updateIndex

public String updateIndex(String indexID,
                          String rsLocator)
                   throws com.google.gwt.user.client.rpc.InvocationException
Specified by:
updateIndex in interface ManagementService
Throws:
com.google.gwt.user.client.rpc.InvocationException

query

public List<String> query(String queryString,
                          String indexID)
                   throws Exception
Specified by:
query in interface ManagementService
Throws:
Exception


Copyright © 2013. All Rights Reserved.