Package org.wso2.carbon.registry.admin.api.governance

# Interface IManageGenericArtifactService<ArtifactsBean>

Type Parameters:
  `ArtifactsBean` - a bean containing a list of artifacts on the repository.

public interface IManageGenericArtifactService<ArtifactsBean>
This provides functionality to manage generic artifacts on the registry.
Statistics:

- addArtifact
- listArtifacts
- editArtifact

- ## Method Summary

  Modifier and Type
  Method
  Description
  `String`
  `addArtifact(String key, String payload, String lifecycleAttribute)`
  Method to add an artifact to the repository.
  `String`
  `editArtifact(String path, String key, String payload, String lifecycleAttribute)`
  Method to edit the artifacts.
  `String[]`
  `getAllLifeCycleState(String LCName)`
  Get all the states from the LC
  `String`
  `getArtifactContent(String path)`
  Method to obtain the content of an Artifact..
  `String`
  `getArtifactUIConfiguration(String key)`
  Method to obtain the UI configuration of an artifact..
  `ArtifactsBean`
  `listArtifacts(String key, String criteria)`
  Method to list the artifacts to a defined criteria.
  `ArtifactsBean`
  `listArtifactsByName(String key, String name)`
  Method to list the artifacts by name.
  `boolean`
  `setArtifactUIConfiguration(String key, String content)`
  Method to set the UI configuration for an artifact..

- ## Method Details

  - ### addArtifact

    String addArtifact(String key, String payload, String lifecycleAttribute) throws org.wso2.carbon.registry.core.exceptions.RegistryException
    Method to add an artifact to the repository.
    Parameters:
      `key` - the identifier of the artifact.
      `payload` - the information payload of the artifact.
      `lifecycleAttribute` - the name of the lifecycle attribute.
    Returns:
      the path of the artifact.
    Throws:
      `Exception` - if the operation failed.
      `org.wso2.carbon.registry.core.exceptions.RegistryException`

  - ### listArtifacts

    ArtifactsBean listArtifacts(String key, String criteria)
    Method to list the artifacts to a defined criteria.
    Parameters:
      `key` - the identifier of the artifact.
      `criteria` - the listing criteria.
    Returns:
      an ArtifactsBean object with artifacts matching to the criteria.
    Throws:
      `Exception` - if the operation failed.

  - ### listArtifactsByName

    ArtifactsBean listArtifactsByName(String key, String name)
    Method to list the artifacts by name.
    Parameters:
      `key` - the identifier of the artifact.
      `name` - the artifact name.
    Returns:
      an ArtifactsBean object with artifacts matching to the criteria.
    Throws:
      `Exception` - if the operation failed.

  - ### editArtifact

    String editArtifact(String path, String key, String payload, String lifecycleAttribute) throws org.wso2.carbon.registry.core.exceptions.RegistryException
    Method to edit the artifacts.
    Parameters:
      `path` - the path of the artifact.
      `key` - the identifier of the artifact.
      `payload` - the information payload of the artifact.
      `lifecycleAttribute` - the name of the lifecycle attribute.
    Returns:
      the location on the repository where lifecycle configurations are stored.
    Throws:
      `Exception` - if the operation failed.
      `org.wso2.carbon.registry.core.exceptions.RegistryException`

  - ### getArtifactContent

    String getArtifactContent(String path) throws org.wso2.carbon.registry.core.exceptions.RegistryException
    Method to obtain the content of an Artifact..
    Parameters:
      `path` - the path of the artifact.
    Returns:
      the location on the repository where lifecycle configurations are stored.
    Throws:
      `Exception` - if the operation failed.
      `org.wso2.carbon.registry.core.exceptions.RegistryException`

  - ### getArtifactUIConfiguration

    String getArtifactUIConfiguration(String key) throws org.wso2.carbon.registry.core.exceptions.RegistryException
    Method to obtain the UI configuration of an artifact..
    Parameters:
      `key` - the identifier of the artifact.
    Returns:
      the location on the repository where lifecycle configurations are stored.
    Throws:
      `Exception` - if the operation failed.
      `org.wso2.carbon.registry.core.exceptions.RegistryException`

  - ### setArtifactUIConfiguration

    boolean setArtifactUIConfiguration(String key, String content) throws org.wso2.carbon.registry.core.exceptions.RegistryException
    Method to set the UI configuration for an artifact..
    Parameters:
      `key` - the identifier of the artifact.
      `content` - the new content of the artifact.
    Returns:
      true if the configuration is properly set..
    Throws:
      `Exception` - if the operation failed.
      `org.wso2.carbon.registry.core.exceptions.RegistryException`

  - ### getAllLifeCycleState

    String[] getAllLifeCycleState(String LCName)
    Get all the states from the LC
    Parameters:
      `LCName` - LC name
    Returns:
      array of LC states