org.eclipse.wst.ws.service.policy.ui
Interface IPolicyOperation


public interface IPolicyOperation

This interface represents a Service policy operation that has been defined in the plugin.xml meta data.


Nested Class Summary
static class IPolicyOperation.OperationKind
          Indicates the kind of Service policy operation that this object represents.
 
Method Summary
 java.lang.String getDefaultItem()
          Returns the default enumeration item for this operation.
 IDescriptor getDescriptor()
          Returns the descriptor for this service policy operation.
 java.lang.String getEnumerationId()
          Returns the enum ID for this operation.
 java.lang.String getId()
          Returns the unique ID associated with this service policy operation.
 IPolicyOperation.OperationKind getOperationKind()
          Returns the kind of service policy operation.
 java.lang.String getPolicyIdPattern()
          Returns the id pattern for this operation.
 IServicePolicy getServicePolicy()
          Returns the service policy for this operation.
 java.lang.String getStateItem(org.eclipse.core.resources.IProject project)
          Returns the current enumeration item for this operation.
 boolean isEnabled(java.util.List<IServicePolicy> selectedPolicies)
          Returns whether this operation should be enabled or not.
 boolean isUseDefaultData()
          Returns whether this operation uses default state or not.
 boolean isWorkspaceOnly()
          Returns whether this is a workspace only operation or not.
 void launchOperation(java.util.List<IServicePolicy> selectedPolicies)
          Launches the service policy operation if this is a complex operation.
 void setStateItem(org.eclipse.core.resources.IProject project, java.lang.String stateItem)
          Sets the current enumeration item for this operation.
 

Method Detail

getId

java.lang.String getId()
Returns the unique ID associated with this service policy operation.

Returns:
returns the unique ID associated with this service policy operation.

getDescriptor

IDescriptor getDescriptor()
Returns the descriptor for this service policy operation.

Returns:
returns the descriptor for this service policy operation.

isWorkspaceOnly

boolean isWorkspaceOnly()
Returns whether this is a workspace only operation or not.

Returns:
returns true if this service policy operation should only appear in the workspace service policy preference page.

getOperationKind

IPolicyOperation.OperationKind getOperationKind()
Returns the kind of service policy operation.

Returns:
returns the kind of service policy operation.

getEnumerationId

java.lang.String getEnumerationId()
Returns the enum ID for this operation.

Returns:
returns the enumeration ID if this service policy operation is an enumeration.

getDefaultItem

java.lang.String getDefaultItem()
Returns the default enumeration item for this operation.

Returns:
returns if this is an enumeration it returns the default item for this enumeration.

launchOperation

void launchOperation(java.util.List<IServicePolicy> selectedPolicies)
Launches the service policy operation if this is a complex operation.

Parameters:
selectedPolicies - the selected service policies.

isEnabled

boolean isEnabled(java.util.List<IServicePolicy> selectedPolicies)
Returns whether this operation should be enabled or not.

Parameters:
selectedPolicies - the selected service policies.
Returns:
returns whether this operation should be enabled or not.

getPolicyIdPattern

java.lang.String getPolicyIdPattern()
Returns the id pattern for this operation.

Returns:
returns the regular expression pattern associated with this operation. All service policy ID that match this regular expression will be associated with this operation.

getServicePolicy

IServicePolicy getServicePolicy()
Returns the service policy for this operation.

Returns:
returns the service policy for this operation.

getStateItem

java.lang.String getStateItem(org.eclipse.core.resources.IProject project)
Returns the current enumeration item for this operation.

Parameters:
project - the project if this is project property page item. For the preference page context null should be specified.
Returns:
returns the current enumeration item for this operation.

setStateItem

void setStateItem(org.eclipse.core.resources.IProject project,
                  java.lang.String stateItem)
Sets the current enumeration item for this operation.

Parameters:
project - the project if this is project property page item. For the preference page context null should be specified.
stateItem - the item.

isUseDefaultData

boolean isUseDefaultData()
Returns whether this operation uses default state or not.

Returns:
returns whether this operation uses default state or not.