public interface IClient
IClient is an interface that must be realized by clients of ICE. It describes the possible interactions between the Eclipse User and ICE.
Modifier and Type | Method and Description |
---|---|
boolean |
connectToCore(java.lang.String hostname,
int port)
This operation directs the client to connect to the Core at the specified remote address and port.
|
int |
createItem(java.lang.String itemType)
This operation directs ICE to create a new Item.
|
void |
deleteItem(int id)
This operation directs ICE to delete the specified Item.
|
java.util.ArrayList<java.lang.String> |
getAvailableItemTypes()
This operation returns a list of the available Item types that can be created by ICE or null if no Items are available.
|
java.lang.Object |
getFileSystem()
This operation retrieves a representation of the file system from the Core.
|
java.util.ArrayList<Identifiable> |
getItems()
This operation returns a list of ICEObjects that represent the Items currently managed by ICE.
|
void |
importFile(java.net.URI file)
This operation directs ICE to import a file into its workspace.
|
int |
importFileAsItem(java.net.URI file,
java.lang.String itemType)
This operation direct ICE import a file into its workspace and load that file as an input for the specified Item type.
|
void |
loadItem(int itemId)
This operation loads an Item for editing or review by the user.
|
void |
processItem(int itemId,
java.lang.String actionName)
This operation directs ICE to process the Item with the specified id by performing a certain Action.
|
void |
setCoreService(ICore core)
A setter for the OSGI Core service.
|
void |
setUIWidgetFactory(IWidgetFactory widgetFactory)
This operation sets the factory that must be used to create widgets for the UI system that is used in the client implementation.
|
void |
throwSimpleError(java.lang.String error)
This operation displays a simple error message for which no response is required.
|
java.lang.Object getFileSystem()
This operation retrieves a representation of the file system from the Core.
A hierarchical list of the workspace directories available to the Eclipse User.
void setCoreService(ICore core)
A setter for the OSGI Core service. This setter is used to register the ICore with the client. It should be used to set the service when the intention is to run the client in "local-only" mode.
core
- int createItem(java.lang.String itemType)
This operation directs ICE to create a new Item. If the Item is successfully created, it returns the identification number of the new Item and launches a UIWidget to gather additional information if needed.
itemType
- The type of Item to create.
The identification number of the new Item.
void setUIWidgetFactory(IWidgetFactory widgetFactory)
This operation sets the factory that must be used to create widgets for the UI system that is used in the client implementation.
widgetFactory
- void loadItem(int itemId)
This operation loads an Item for editing or review by the user.
itemId
- The identification number of the Item that should be loaded.
void throwSimpleError(java.lang.String error)
This operation displays a simple error message for which no response is required.
error
- The error message.
java.util.ArrayList<java.lang.String> getAvailableItemTypes()
This operation returns a list of the available Item types that can be created by ICE or null if no Items are available.
The list of ItemTypes that can be created by ICE.
void processItem(int itemId, java.lang.String actionName)
This operation directs ICE to process the Item with the specified id by performing a certain Action.
itemId
- The id number of Item that should be processed.
actionName
- The name of the Action that should be performed for the Item.
boolean connectToCore(java.lang.String hostname, int port)
This operation directs the client to connect to the Core at the specified remote address and port. If the port is less than or equal to zero, the client will default to port 80. If the hostname is null, this operation returns false. If the client needs to retrieve a username and password from the user, it will request an ExtraInfoWidget that is configured to seek a username and password.
hostname
- The hostname of the remote ICore.
port
- The port on which the client should connect to the remote ICore.
True if the client was able to connect to the core and false if not.
java.util.ArrayList<Identifiable> getItems()
This operation returns a list of ICEObjects that represent the Items currently managed by ICE. Each ICEObject contains the name, id and description of an Item.
The list of Identifiables that represents the Items.
void deleteItem(int id)
This operation directs ICE to delete the specified Item.
id
- The identification number of the new Item.
void importFile(java.net.URI file)
This operation directs ICE to import a file into its workspace.
file
- The file that should be imported. Nothing will happen if this argument is null.
int importFileAsItem(java.net.URI file, java.lang.String itemType)
This operation direct ICE import a file into its workspace and load that file as an input for the specified Item type.
file
- The file that should be imported. Nothing will happen if this argument is null.
itemType
- The type of Item to create.
The identification number given of the newly created Item or -1 if it was unable to create the Item.