org.wso2.carbon.governance.api.services.dataobjects

## Interface Service

- All Superinterfaces:
    GovernanceArtifact
  All Known Implementing Classes:
    ServiceImpl

      public interface Service
      extends GovernanceArtifact

- - ### Method Summary

    All Methods Instance Methods Abstract Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `activate()` Deprecated. since active functionality is no longer used.
    `void` | `attachEndpoint(Endpoint endpoint)` Attach an endpoint artifact to a service artifact.
    `void` | `attachPolicy(Policy policy)` Attach a policy artifact to a service artifact.
    `void` | `attachSchema(Schema schema)` Attach a schema artifact to a service artifact.
    `void` | `attachWSDL(Wsdl wsdl)` Attach a WSDL artifact to a service artifact.
    `void` | `deactivate()` Deprecated. since active functionality is no longer used.
    `void` | `detachEndpoint(String endpointId)` Detach an endpoint artifact from a service artifact.
    `void` | `detachPolicy(String policyId)` Detach a policy artifact from a service artifact.
    `void` | `detachSchema(String schemaId)` Detach a schema artifact from a service artifact.
    `void` | `detachWSDL(String wsdlId)` Detach a WSDL artifact from a service artifact.
    `Endpoint[]` | `getAttachedEndpoints()` Method to retrieve all endpoints attached to this service artifact.
    `Policy[]` | `getAttachedPolicies()` Method to retrieve all policies attached to this service artifact.
    `Schema[]` | `getAttachedSchemas()` Method to retrieve all schemas attached to this service artifact.
    `Wsdl[]` | `getAttachedWsdls()` Method to retrieve all WSDLs attached to this service artifact.
    `boolean` | `isActive()` Deprecated. since active functionality is no longer used.

    - ### Methods inherited from interface org.wso2.carbon.governance.api.common.dataobjects.GovernanceArtifact

      `addAssociation, addAssociation, addAttribute, addBidirectionalAssociation, addTag, addTags, attach, attach, attachLifecycle, checkLCItem, compareTo, detach, getAllCheckListItemNames, getAllLifecycleActions, getAllVotingItems, getAllVotingItems, getAssociatedArtifactIds, getAssociations, getAttribute, getAttributeKeys, getAttributes, getCurrentStateDuration, getDependencies, getDependents, getId, getLifecycleName, getLifecycleNames, getLifecycleState, getLifecycleState, getMediaType, getPath, getPropertyKeys, getQName, invokeAction, invokeAction, isLCItemChecked, isRegistryAwareArtifact, isVoted, isVoted, listTags, removeAssociation, removeAssociation, removeAttribute, removeTag, removeTags, setAttribute, setAttributes, setId, setQName, uncheckLCItem, uniqueTo, unvote, unvote, vote, vote`

- - ### Method Detail

    - #### attachPolicy

          void attachPolicy(Policy policy)
                     throws GovernanceException

      Attach a policy artifact to a service artifact. Both the artifacts should be saved, before calling this method.
      Parameters:
        `policy` - the policy to attach.
      Throws:
        `GovernanceException` - if the operation failed.

    - #### detachPolicy

          void detachPolicy(String policyId)
                     throws GovernanceException

      Detach a policy artifact from a service artifact. Both the artifacts should be saved, before calling this method.
      Parameters:
        `policyId` - the identifier of the policy to detach.
      Throws:
        `GovernanceException` - if the operation failed.

    - #### getAttachedPolicies

          Policy[] getAttachedPolicies()
                                throws GovernanceException

      Method to retrieve all policies attached to this service artifact.
      Returns:
        all policies attached to this service artifact.
      Throws:
        `GovernanceException` - if the operation failed.

    - #### attachSchema

          void attachSchema(Schema schema)
                     throws GovernanceException

      Attach a schema artifact to a service artifact. Both the artifacts should be saved, before calling this method.
      Parameters:
        `schema` - the schema to attach.
      Throws:
        `GovernanceException` - if the operation failed.

    - #### detachSchema

          void detachSchema(String schemaId)
                     throws GovernanceException

      Detach a schema artifact from a service artifact. Both the artifacts should be saved, before calling this method.
      Parameters:
        `schemaId` - the identifier of the schema to detach.
      Throws:
        `GovernanceException` - if the operation failed.

    - #### getAttachedSchemas

          Schema[] getAttachedSchemas()
                               throws GovernanceException

      Method to retrieve all schemas attached to this service artifact.
      Returns:
        all schemas attached to this service artifact.
      Throws:
        `GovernanceException` - if the operation failed.

    - #### attachWSDL

          void attachWSDL(Wsdl wsdl)
                   throws GovernanceException

      Attach a WSDL artifact to a service artifact. Both the artifacts should be saved, before calling this method.
      Parameters:
        `wsdl` - the WSDL to attach.
      Throws:
        `GovernanceException` - if the operation failed.

    - #### detachWSDL

          void detachWSDL(String wsdlId)
                   throws GovernanceException

      Detach a WSDL artifact from a service artifact. Both the artifacts should be saved, before calling this method.
      Parameters:
        `wsdlId` - the identifier of the WSDL to detach.
      Throws:
        `GovernanceException` - if the operation failed.

    - #### getAttachedWsdls

          Wsdl[] getAttachedWsdls()
                           throws GovernanceException

      Method to retrieve all WSDLs attached to this service artifact.
      Returns:
        all WSDLs attached to this service artifact.
      Throws:
        `GovernanceException` - if the operation failed.

    - #### attachEndpoint

          void attachEndpoint(Endpoint endpoint)
                       throws GovernanceException

      Attach an endpoint artifact to a service artifact. Both the artifacts should be saved, before calling this method.
      Parameters:
        `endpoint` - the endpoint to attach.
      Throws:
        `GovernanceException` - if the operation failed.

    - #### detachEndpoint

          void detachEndpoint(String endpointId)
                       throws GovernanceException

      Detach an endpoint artifact from a service artifact. Both the artifacts should be saved, before calling this method.
      Parameters:
        `endpointId` - the identifier of the endpoint to detach.
      Throws:
        `GovernanceException` - if the operation failed.

    - #### getAttachedEndpoints

          Endpoint[] getAttachedEndpoints()
                                   throws GovernanceException

      Method to retrieve all endpoints attached to this service artifact.
      Returns:
        all endpoints attached to this service artifact.
      Throws:
        `GovernanceException` - if the operation failed.

    - #### activate

          void activate()
                 throws GovernanceException

      Deprecated. since active functionality is no longer used.
      Method to activate this service.
      Throws:
        `GovernanceException` - if the operation failed.

    - #### deactivate

          void deactivate()
                   throws GovernanceException

      Deprecated. since active functionality is no longer used.
      Method to deactivate this service.
      Throws:
        `GovernanceException` - if the operation failed.

    - #### isActive

          boolean isActive()
                    throws GovernanceException

      Deprecated. since active functionality is no longer used.
      Method to obtain whether this service is active or not.
      Returns:
        true if this service is active, and false if not.
      Throws:
        `GovernanceException` - if the operation failed.

Copyright © 2017 WSO2. All Rights Reserved.