|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface ISiteController
A site controller operation execution and notification on a specific site
There are a small set of required operations for any type of site.
This set includes only read only operations.
Any other operation is optional and can be customized by each site type
by registering operation handlers
Clients may be notified on the performed operations by registering as a ISiteOperationListener listener
This type of listener supports operation cancelation
| Method Summary | |
|---|---|
void |
addOperationListener(ISiteOperationListener listener)
Add a listener to be notified of site operations |
void |
execute(ISiteOperation operation)
Execute the given operation on the given target resource The operation result status can be retrieved from the operation after the execution finished by calling ISiteOperation.getStatus()
If the operation is asynchronously executed then you may regsiter a
listener to be notified when the operation completes to be able to retrieve
the operation result status |
boolean |
exists(ISiteResource resource)
Check whether the given resource exists |
ISiteResource |
getChild(ISiteFolder container,
java.lang.String path)
Get the child resource having the given path relative to the container resource |
ISiteResource[] |
getChildren(ISiteFolder resource,
org.eclipse.core.runtime.IProgressMonitor monitor)
Get the children for the given resource if any |
IResourceMetadata |
getMetadata(ISiteResource resource)
Get the metadata for the given resource |
ISiteOperationHandler |
getOperationHandler(java.lang.String opType)
Get the registered handler for the given operation type or null if none was registered |
ISite |
getSite()
Get the controlled site |
boolean |
isOperationEnabled(java.lang.String operationType)
Tests whether or not the controller is able to handle the given type of operation. |
void |
login(java.util.Map credentials)
Open a new session using given credentials |
void |
logout()
End current session |
void |
registerOperationHandler(java.lang.String opType,
ISiteOperationHandler handler)
Register a handler for the given operation type |
void |
removeOperationListener(ISiteOperationListener listener)
Remove the given listener if already registered or do nothing otherwise |
void |
setSite(ISite site)
Set the site to be controlled. |
void |
unregisterOperationHandler(java.lang.String opType)
Unregister the handler for the given operation if any |
| Method Detail |
|---|
ISite getSite()
void setSite(ISite site)
site - the site to be controlledvoid addOperationListener(ISiteOperationListener listener)
listener - the listener to registervoid removeOperationListener(ISiteOperationListener listener)
listener - the listener to remove
void registerOperationHandler(java.lang.String opType,
ISiteOperationHandler handler)
opType - the operation typehandler - the handler to register with the given operation typevoid unregisterOperationHandler(java.lang.String opType)
opType - the operation typeISiteOperationHandler getOperationHandler(java.lang.String opType)
opType - the operation type
boolean isOperationEnabled(java.lang.String operationType)
operationType - the operation type
void login(java.util.Map credentials)
throws org.eclipse.core.runtime.CoreException
credentials - the credetials to use to login
org.eclipse.core.runtime.CoreException - if an errormoccurs or login failed
void logout()
throws org.eclipse.core.runtime.CoreException
CoreExceptionif - amn error occurs
org.eclipse.core.runtime.CoreException
ISiteResource getChild(ISiteFolder container,
java.lang.String path)
throws org.eclipse.core.runtime.CoreException
container - the container resource from where to find the childpath - the relative path of the resource to find
org.eclipse.core.runtime.CoreException
ISiteResource[] getChildren(ISiteFolder resource,
org.eclipse.core.runtime.IProgressMonitor monitor)
throws org.eclipse.core.runtime.CoreException
resource - the resource to query for childrenmonitor - the monitor if progress monitorinf is required otherwise null
org.eclipse.core.runtime.CoreException - if an error occurs or resource is not existing
IResourceMetadata getMetadata(ISiteResource resource)
throws org.eclipse.core.runtime.CoreException
resource - the resource
org.eclipse.core.runtime.CoreException - if an error occurs or resource is not existing
boolean exists(ISiteResource resource)
throws org.eclipse.core.runtime.CoreException
resource - the resource to test
org.eclipse.core.runtime.CoreException - if an error occurs or resource is not existing
void execute(ISiteOperation operation)
throws org.eclipse.core.runtime.CoreException
ISiteOperation.getStatus()
If the operation is asynchronously executed then you may regsiter a
listener to be notified when the operation completes to be able to retrieve
the operation result status
operation - the operation to execute
org.eclipse.core.runtime.CoreException - if an error occurs or resource is not existing
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||