Class ServiceImpl

  • All Implemented Interfaces:
    GovernanceArtifact, Service

    public class ServiceImpl
    extends GovernanceArtifactImpl
    implements Service
    This represents a service artifact stored on the Registry. Service artifacts are created as a result of adding a new service or uploading or importing a WSDL file into the registry.
    • Constructor Detail

      • ServiceImpl

        protected ServiceImpl​(GovernanceArtifact service)
        Copy constructor used for cloning.
        Parameters:
        service - the object to be copied.
      • ServiceImpl

        public ServiceImpl​(String id,
                           QName qName)
        Constructor accepting resource identifier and the qualified name.
        Parameters:
        id - the resource identifier.
        qName - the qualified name.
      • ServiceImpl

        public ServiceImpl​(String id,
                           org.apache.axiom.om.OMElement serviceContentElement)
                    throws GovernanceException
        Constructor accepting resource identifier and the service content.
        Parameters:
        id - the resource identifier.
        serviceContentElement - an XML element containing the service content.
        Throws:
        GovernanceException - if the construction fails.
    • Method Detail

      • setActive

        @Deprecated
        public void setActive​(boolean isActive)
                       throws GovernanceException
        Deprecated.
        since active functionality is no longer used.
        Method to set/unset the active status of this service.
        Parameters:
        isActive - whether the service is active.
        Throws:
        GovernanceException - if the operation failed.
      • isActive

        public boolean isActive()
                         throws GovernanceException
        Deprecated.
        since active functionality is no longer used.
        Method to obtain whether this service is active or not.
        Specified by:
        isActive in interface Service
        Returns:
        true if this service is active, and false if not.
        Throws:
        GovernanceException - if the operation failed.
      • attachPolicy

        public void attachPolicy​(Policy policy)
                          throws GovernanceException
        Attach a policy artifact to a service artifact. Both the artifacts should be saved, before calling this method.
        Specified by:
        attachPolicy in interface Service
        Parameters:
        policy - the policy to attach.
        Throws:
        GovernanceException - if the operation failed.
      • detachPolicy

        public void detachPolicy​(String policyId)
                          throws GovernanceException
        Detach a policy artifact from a service artifact. Both the artifacts should be saved, before calling this method.
        Specified by:
        detachPolicy in interface Service
        Parameters:
        policyId - the identifier of the policy to detach.
        Throws:
        GovernanceException - if the operation failed.
      • attachSchema

        public void attachSchema​(Schema schema)
                          throws GovernanceException
        Attach a schema artifact to a service artifact. Both the artifacts should be saved, before calling this method.
        Specified by:
        attachSchema in interface Service
        Parameters:
        schema - the schema to attach.
        Throws:
        GovernanceException - if the operation failed.
      • detachSchema

        public void detachSchema​(String schemaId)
                          throws GovernanceException
        Detach a schema artifact from a service artifact. Both the artifacts should be saved, before calling this method.
        Specified by:
        detachSchema in interface Service
        Parameters:
        schemaId - the identifier of the schema to detach.
        Throws:
        GovernanceException - if the operation failed.
      • attachWSDL

        public void attachWSDL​(Wsdl wsdl)
                        throws GovernanceException
        Attach a WSDL artifact to a service artifact. Both the artifacts should be saved, before calling this method.
        Specified by:
        attachWSDL in interface Service
        Parameters:
        wsdl - the WSDL to attach.
        Throws:
        GovernanceException - if the operation failed.
      • detachWSDL

        public void detachWSDL​(String wsdlId)
                        throws GovernanceException
        Detach a WSDL artifact from a service artifact. Both the artifacts should be saved, before calling this method.
        Specified by:
        detachWSDL in interface Service
        Parameters:
        wsdlId - the identifier of the WSDL to detach.
        Throws:
        GovernanceException - if the operation failed.
      • attachEndpoint

        public void attachEndpoint​(Endpoint endpoint)
                            throws GovernanceException
        Attach an endpoint artifact to a service artifact. Both the artifacts should be saved, before calling this method.
        Specified by:
        attachEndpoint in interface Service
        Parameters:
        endpoint - the endpoint to attach.
        Throws:
        GovernanceException - if the operation failed.
      • detachEndpoint

        public void detachEndpoint​(String endpointId)
                            throws GovernanceException
        Detach an endpoint artifact from a service artifact. Both the artifacts should be saved, before calling this method.
        Specified by:
        detachEndpoint in interface Service
        Parameters:
        endpointId - the identifier of the endpoint to detach.
        Throws:
        GovernanceException - if the operation failed.