Class ArtifactTypeStore

    • Constructor Detail

      • ArtifactTypeStore

        public ArtifactTypeStore()
    • Method Detail

      • setInstance

        public static void setInstance​(ArtifactTypeStore store)
        Replaces the current store instance with the given one.
        Parameters:
        store - the new store.
      • getArtifactTypeUsageMappings

        public abstract Collection<ArtifactTypeUsageMapping> getArtifactTypeUsageMappings​(String containerId)
                                                                                   throws ArtifactTypeStoreException
        Returns the list of Artifact Type Usage Mapping for a given containerId.
        Parameters:
        containerId - The container ID of the Artifact Type Usage Mapping
        Returns:
        The list of the ArtifactTypeUsageMapping associated with the containerId
        Throws:
        ArtifactTypeStoreException - if an error occurs while querying the store.
      • setArtifactTypeUsageMappings

        public abstract void setArtifactTypeUsageMappings​(String containerId,
                                                          Collection<ArtifactTypeUsageMapping> artifactTypeUsageMappings)
                                                   throws ArtifactTypeStoreException
        Saves a list of Artifact Type Usage Mapping for a given containerId.
        Parameters:
        containerId - the container ID
        artifactTypeUsageMappings - the list of Artifact Type Usage Mapping
        Throws:
        ArtifactTypeStoreException - if an error occurs while updating the store.
      • getDefaultArtifactTypeUsageMappings

        public abstract Collection<ArtifactTypeUsageMapping> getDefaultArtifactTypeUsageMappings​(String containerId)
                                                                                          throws ArtifactTypeStoreException
        Returns the list of default artifact type usage mappings. These are the mappings to use when no customization has been done by the administrator for the given container.
        Parameters:
        containerId - the container ID.
        Returns:
        A list of ArtifactTypeUsageMapping containing the requested artifacts
        Throws:
        ArtifactTypeStoreException - if an error occurs while querying the store.
      • getArtifactTypeUsageMappings

        public abstract Collection<ArtifactTypeUsageMapping> getArtifactTypeUsageMappings​(String containerId,
                                                                                          String templateId)
                                                                                   throws ArtifactTypeStoreException
        Returns the list of artifact type usage mappings for the requested template. Applications are free to define as many templates as they want.
        Parameters:
        containerId - the container ID.
        templateId - the template ID.
        Returns:
        A list of ArtifactTypeUsageMapping containing the requested artifacts
        Throws:
        ArtifactTypeStoreException - if an error occurs while querying the store.
      • getArtifactTypes

        public abstract Collection<ArtifactType> getArtifactTypes​(String containerId)
                                                           throws ArtifactTypeStoreException
        Returns the Artifact Types available for a containerId.
        Parameters:
        containerId - the container ID.
        Returns:
        A list of ArtifactType containing the identifier and label of the artifacts, the Resource Type and the available usages.
        Throws:
        ArtifactTypeStoreException - if an error occurs while querying the artifact types.