Package com.orchestranetworks.service

# Class ServiceKey

java.lang.Object
com.orchestranetworks.service.ServiceKey

public class ServiceKey extends Object
Identifies a user service.

See Also:
  - User services
  - Built-in services
  - `UIHttpManagerComponent.setService(ServiceKey)`

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final ServiceKey`
  `ASSOCIATION_ATTACH`
  Built-in service to perform an association attachment.
  `static final ServiceKey`
  `ASSOCIATION_DETACH`
  Built-in service to perform an association detachment.
  `static final ServiceKey`
  `ASSOCIATION_MOVE`
  Built-in service to perform an association move.
  `static final ServiceKey`
  `CLOSE`
  Built-in service to close a dataspace or snapshot.
  `static final ServiceKey`
  `COMPARE`
  Built-in service to compare data: The user is directed to the comparison interface.
  `static final ServiceKey`
  `CREATE`
  Built-in service to create a table record: the user is directed to a page in order to a new record in the selected table.
  `static final ServiceKey`
  `DEFAULT_SERVICE`
  Built-in service to access a table record or a dataset.
  `static final ServiceKey`
  `DUPLICATE`
  Built-in service to duplicate a table record.
  `static final ServiceKey`
  `EXPORT_TO_CSV`
  Built-in service to export data from EBX® to CSV format.
  `static final ServiceKey`
  `EXPORT_TO_XML`
  Built-in service to export data from EBX® to XML format.
  `static final ServiceKey`
  `HIERARCHY_ATTACH`
  Built-in service to attach nodes in a hierarchical view.
  `static final ServiceKey`
  `HIERARCHY_DETACH`
  Built-in service to detach nodes in a hierarchical view.
  `static final ServiceKey`
  `HIERARCHY_EDIT_LINK_RECORD`
  Built-in service to edit the record that links two hierarchy nodes.
  `static final ServiceKey`
  `HIERARCHY_MASS_MOVE`
  Built-in service to perform a mass move of nodes in a hierarchical view.
  `static final ServiceKey`
  `IMPORT_FROM_CSV`
  Built-in service to import data from a CSV file into EBX®.
  `static final ServiceKey`
  `IMPORT_FROM_XML`
  Built-in service to import data from an XML file into EBX®.
  `static final ServiceKey`
  `INHERIT`
  Built-in service makes a record inherit from the parent dataset.
  `static final ServiceKey`
  `MASS_UPDATE`
  Built-in service to perform a mass update of records.
  `static final ServiceKey`
  `MASSDELETE`
  Built-in service to perform a mass delete of records.
  `static final ServiceKey`
  `MERGE`
  Built-in service to merge a dataspace into its parent: the user is directed to the merge user interface in order to merge the selected dataspace into its parent dataspace.
  `static final ServiceKey`
  `MERGE_VIEW`
  Built-in service to display the merge view: the user is directed to the merge user interface in order to detect differences and conflicts without performing the merge of the selected dataspace into its parent.
  `static final ServiceKey`
  `MY_PROFILE`
  Built-in service to access current user's profile settings.
  `static final ServiceKey`
  `OPEN_LINK_RECORD`
  Built-in service to edit the record that links an associated object to its parent record.
  `static final ServiceKey`
  `OPTIMIZE`
  Built-in service to optimize and refactor data in EBX®.
  `static final ServiceKey`
  `OVERWRITE`
  Built-in service makes a record overwrite from inheritance of the parent dataset.
  `static final ServiceKey`
  `REFRESH_REPLICAS`
  Built-in service to refresh replicas for replicated tables.
  `static final ServiceKey`
  `SELECT_DATASPACE`
  Built-in service to select a dataspace: the user is directed to a page in order to work with the selected dataspace.
  `static final ServiceKey`
  `VALIDATION`
  Built-in service to validate a dataspace, snapshot, dataset, table or record: the user is directed to the validation report of the selected entity.
  `static final ServiceKey`
  `VIEW_HISTORY`
  Built-in service to view table or row history.
  `static final ServiceKey`
  `WORKFLOW`
  Built-in service to access the data workflows user interface.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `boolean`
  `equals(Object anObject)`
  `String`
  `format()`
  Returns a persistent identifier for this service key.
  `static ServiceKey`
  `forModuleServiceName(String moduleName, String serviceName)`
  Returns the identifier of a service defined in a module (user service on branches or versions, for more information see the class comment).
  `static ServiceKey`
  `forName(String serviceName)`
  Returns the identifier of a service defined in a data model (user service on datasets or records, for more information see the class comment).
  `String`
  `getModuleName()`
  `String`
  `getName()`
  Returns the full name of the service.
  `String`
  `getServiceName()`
  Returns the local name of the service, by removing the prefix before and including the '@' character.
  `int`
  `hashCode()`
  `boolean`
  `isBuiltInService()`
  Returns `true` if this instance identifies a built-in service.
  `boolean`
  `isIdentifierInDataModel()`
  Returns `true` if this key identifies a service declared in a data model.
  `static ServiceKey`
  `parse(String aString)`
  Returns the service key that corresponds to the specified string.
  `String`
  `toString()`

  ### Methods inherited from class java.lang.Object

  `getClass, notify, notifyAll, wait, wait, wait`

- ## Field Details

  - ### DEFAULT_SERVICE

    public static final ServiceKey DEFAULT_SERVICE
    Built-in service to access a table record or a dataset. This is the default service.

    A dataspace or snapshot identifier is required for this service.

    Value is: `@default`.

    Since:
      5.7.0

  - ### CLOSE

    public static final ServiceKey CLOSE
    Built-in service to close a dataspace or snapshot.

    A dataspace or snapshot identifier is required for this service.

    Value is: `@close`.

    Note: This service cannot be called directly from `UIHttpManagerComponent`. This constant is only used to grant permission to to close a dataspace or a snapshot. See `Profile.forUserWithSpecificPrivilege(String, ServiceKey)`.

    Since:
      5.2.4 privilege dataspace or snapshot closing

  - ### CREATE

    public static final ServiceKey CREATE
    Built-in service to create a table record: the user is directed to a page in order to a new record in the selected table.

    A table must be selected for this service to be operational.

    Value is: `@creation`.

    Note: this constant is also used to grant the privilege to create a dataspace or a snapshot (see `Profile.forUserWithSpecificPrivilege(String, ServiceKey)`).

    Since:
      5.2.4 privilege snapshot creation
    See Also:
      - Built-in services documentation
      - `UIHttpManagerComponent.selectNode(com.onwbp.adaptation.Adaptation, com.orchestranetworks.schema.Path)`

  - ### DUPLICATE

    public static final ServiceKey DUPLICATE
    Built-in service to duplicate a table record.

    A record must be selected for this service to be operational.

    Value is: `@duplicate`.

    See Also:
      - Built-in services documentation
      - `UIHttpManagerComponent.selectInstanceOrOccurrence(com.onwbp.adaptation.Adaptation)`

  - ### VALIDATION

    public static final ServiceKey VALIDATION
    Built-in service to validate a dataspace, snapshot, dataset, table or record: the user is directed to the validation report of the selected entity.

    The target must be selected for this service to be operational.

    Value is: `@validation`.

    See Also:
      - Built-in services documentation
      - `UIHttpManagerComponent`

  - ### MERGE

    public static final ServiceKey MERGE
    Built-in service to merge a dataspace into its parent: the user is directed to the merge user interface in order to merge the selected dataspace into its parent dataspace.

    A dataspace must be selected for this service to be operational; this selection specifies the dataspace to merge.

    Value is: `@merge`.

    See Also:
      - Built-in services documentation
      - `UIHttpManagerComponent.selectHome(com.onwbp.adaptation.AdaptationHome)`

  - ### MERGE_VIEW

    public static final ServiceKey MERGE_VIEW
    Built-in service to display the merge view: the user is directed to the merge user interface in order to detect differences and conflicts without performing the merge of the selected dataspace into its parent.

    A dataspace must be selected for this service to be operational; this selection specifies the dataspace to merge.

    Value is: "@merge.view".

    See Also:
      - Built-in services documentation
      - `UIHttpManagerComponent.selectHome(com.onwbp.adaptation.AdaptationHome)`

  - ### COMPARE

    public static final ServiceKey COMPARE
    Built-in service to compare data: The user is directed to the comparison interface. Entities that can be compared are: two dataspaces/snapshots, two datasets, two tables or two table records.

    To use this service, the method `UIHttpManagerComponent.compareSelectionWithEntity(com.orchestranetworks.instance.HomeKey, com.onwbp.adaptation.AdaptationName, String)` must be called. If the service is called using a method other than Java, the left entity is selected using the standard parameters (`branch`, `version`, `instance`, `xpath`); the right entity is to be selected using the parameters: `compare.branch`, `compare.version`, `compare.instance`, `compare.xpath` (these parameters have the same syntax as the standard parameters).

    Value is: `@compare`.

    See Also:
      - Built-in services documentation
      - `DifferenceHelper`

  - ### EXPORT_TO_XML

    public static final ServiceKey EXPORT_TO_XML
    Built-in service to export data from EBX® to XML format.

    A table must be selected for this service to be operational.

    Value is: `@exportToXML`.

    See Also:
      - `UIHttpManagerComponent.selectNode(com.onwbp.adaptation.Adaptation, com.orchestranetworks.schema.Path)`

  - ### EXPORT_TO_CSV

    public static final ServiceKey EXPORT_TO_CSV
    Built-in service to export data from EBX® to CSV format.

    A table must be selected for this service to be operational.

    Value is: `@exportToCSV`.

    See Also:
      - `UIHttpManagerComponent.selectNode(com.onwbp.adaptation.Adaptation, com.orchestranetworks.schema.Path)`

  - ### IMPORT_FROM_XML

    public static final ServiceKey IMPORT_FROM_XML
    Built-in service to import data from an XML file into EBX®.

    A table must be selected for this service to be operational.

    Value is: `@importFromXML`.

    See Also:
      - `UIHttpManagerComponent.selectNode(com.onwbp.adaptation.Adaptation, com.orchestranetworks.schema.Path)`

  - ### IMPORT_FROM_CSV

    public static final ServiceKey IMPORT_FROM_CSV
    Built-in service to import data from a CSV file into EBX®.

    A table must be selected for this service to be operational.

    Value is: `@importFromCSV`.

    See Also:
      - `UIHttpManagerComponent.selectNode(com.onwbp.adaptation.Adaptation, com.orchestranetworks.schema.Path)`

  - ### OPTIMIZE

    public static final ServiceKey OPTIMIZE
    Built-in service to optimize and refactor data in EBX®.

    Value is: `@optimize`.

    Note: This service cannot be called directly from `UIHttpManagerComponent`.

  - ### MASSDELETE

    public static final ServiceKey MASSDELETE
    Built-in service to perform a mass delete of records.

    Note: This service cannot be called directly from `UIHttpManagerComponent`.

  - ### WORKFLOW

    public static final ServiceKey WORKFLOW
    Built-in service to access the data workflows user interface. If a work item is accessed through this service, it will not be automatically allocated and started unless the parameter `startWorkItem` has been set to `true`.

    The target section can be specified using the parameter `workflowView`.

    Value is: `@workflow`.

    See Also:
      - `UIHttpManagerComponent.selectWorkflowView(WorkflowView)`
      - `UIHttpManagerComponent.selectWorkItem(boolean, com.orchestranetworks.workflow.WorkItemKey)`
      - `UIHttpManagerComponent.setService(ServiceKey)`
      - `WorkflowView`

  - ### SELECT_DATASPACE

    public static final ServiceKey SELECT_DATASPACE
    Built-in service to select a dataspace: the user is directed to a page in order to work with the selected dataspace.

    Value is: `@selectDataSpace`.

  - ### HIERARCHY_MASS_MOVE

    public static final ServiceKey HIERARCHY_MASS_MOVE
    Built-in service to perform a mass move of nodes in a hierarchical view.

    Note: This service cannot be called directly from `UIHttpManagerComponent`.

    Since:
      5.7.0

  - ### HIERARCHY_ATTACH

    public static final ServiceKey HIERARCHY_ATTACH
    Built-in service to attach nodes in a hierarchical view.

    Note: This service cannot be called directly from `UIHttpManagerComponent`.

    Since:
      6.2.0

  - ### HIERARCHY_DETACH

    public static final ServiceKey HIERARCHY_DETACH
    Built-in service to detach nodes in a hierarchical view.

    Note: This service cannot be called directly from `UIHttpManagerComponent`.

    Since:
      6.2.0

  - ### HIERARCHY_EDIT_LINK_RECORD

    public static final ServiceKey HIERARCHY_EDIT_LINK_RECORD
    Built-in service to edit the record that links two hierarchy nodes.

    Note: This service cannot be called directly from `UIHttpManagerComponent`.

    Since:
      5.7.1

  - ### OPEN_LINK_RECORD

    public static final ServiceKey OPEN_LINK_RECORD
    Built-in service to edit the record that links an associated object to its parent record.

    Note: This service cannot be called directly from `UIHttpManagerComponent`.

    Since:
      5.8.1

  - ### INHERIT

    public static final ServiceKey INHERIT
    Built-in service makes a record inherit from the parent dataset.

    Note: This service cannot be called directly from `UIHttpManagerComponent`.

    Since:
      5.7.0

  - ### OVERWRITE

    public static final ServiceKey OVERWRITE
    Built-in service makes a record overwrite from inheritance of the parent dataset.

    Note: This service cannot be called directly from `UIHttpManagerComponent`.

    Since:
      5.7.0

  - ### MASS_UPDATE

    public static final ServiceKey MASS_UPDATE
    Built-in service to perform a mass update of records.

    Note: This service cannot be called directly from `UIHttpManagerComponent`.

    Since:
      5.7.0

  - ### ASSOCIATION_ATTACH

    public static final ServiceKey ASSOCIATION_ATTACH
    Built-in service to perform an association attachment.

    Note: This service cannot be called directly from `UIHttpManagerComponent`.

    Since:
      5.7.0

  - ### ASSOCIATION_DETACH

    public static final ServiceKey ASSOCIATION_DETACH
    Built-in service to perform an association detachment.

    Note: This service cannot be called directly from `UIHttpManagerComponent`.

  - ### ASSOCIATION_MOVE

    public static final ServiceKey ASSOCIATION_MOVE
    Built-in service to perform an association move.

    Note: This service cannot be called directly from `UIHttpManagerComponent`.

    Since:
      5.7.0

  - ### REFRESH_REPLICAS

    public static final ServiceKey REFRESH_REPLICAS
    Built-in service to refresh replicas for replicated tables.

    Note: This service cannot be called directly from `UIHttpManagerComponent`.

    Since:
      5.7.0

  - ### VIEW_HISTORY

    public static final ServiceKey VIEW_HISTORY
    Built-in service to view table or row history.

    Note: This service cannot be called directly from `UIHttpManagerComponent`.

    Since:
      5.7.0

  - ### MY_PROFILE

    public static final ServiceKey MY_PROFILE
    Built-in service to access current user's profile settings.

    Dataspace should always be set to `Reference`.

    Since:
      5.9.8

- ## Method Details

  - ### forName

    public static ServiceKey forName(String serviceName)
    Returns the identifier of a service defined in a data model (user service on datasets or records, for more information see the class comment).
    Parameters:
      `serviceName` - name of the service in the data model (as defined by the attribute `/xs:schema/xs:complexType/@name`)
    See Also:
      - `isIdentifierInDataModel()`

  - ### forModuleServiceName

    public static ServiceKey forModuleServiceName(String moduleName, String serviceName)
    Returns the identifier of a service defined in a module (user service on branches or versions, for more information see the class comment).
    Parameters:
      `moduleName` - name of the module (as defined by the element `/module/name` in the document located at `/WEB-INF/ebx/module.xml`).
      `serviceName` - name of the service in the module (as defined by the attribute `/module/services/service/@name` in the document `/WEB-INF/ebx/module.xml`).

  - ### parse

    public static ServiceKey parse(String aString)
    Returns the service key that corresponds to the specified string.

    The specified string is generally generated by the method `format()`.

    Throws:
      `IllegalArgumentException` - if specified string is incorrect.

  - ### isBuiltInService

    public boolean isBuiltInService()
    Returns `true` if this instance identifies a built-in service.

  - ### isIdentifierInDataModel

    public boolean isIdentifierInDataModel()
    Returns `true` if this key identifies a service declared in a data model.
    Since:
      5.7.0
    See Also:
      - `forName(String)`

  - ### getModuleName

    public String getModuleName()

  - ### getServiceName

    public String getServiceName()
    Returns the local name of the service, by removing the prefix before and including the '@' character.

  - ### getName

    public String getName()
    Returns the full name of the service.

  - ### format

    public String format()
    Returns a persistent identifier for this service key.

    The service key can be re-obtained by parsing this persistent identifier using the method `parse(String)`.

  - ### equals

    public boolean equals(Object anObject)
    Overrides:
      `equals` in class `Object`

  - ### hashCode

    public int hashCode()
    Overrides:
      `hashCode` in class `Object`

  - ### toString

    public String toString()
    Overrides:
      `toString` in class `Object`