Class IdentifierProvider

    • Constructor Detail

      • IdentifierProvider

        public IdentifierProvider()
    • Method Detail

      • setConfigurationService

        @Autowired(required=true)
        public void setConfigurationService​(ConfigurationService configurationService)
      • setParentService

        public void setParentService​(IdentifierService parentService)
      • supports

        public abstract boolean supports​(Class<? extends Identifier> identifier)
        Can this provider provide identifiers of a given type?
        Parameters:
        identifier - requested type.
        Returns:
        true if the given type is assignable from this provider's type.
      • supports

        public abstract boolean supports​(String identifier)
        Can this provider provide identifiers of a given type?
        Parameters:
        identifier - requested type.
        Returns:
        true if this provider can provide the named type of identifier.
      • register

        public abstract String register​(Context context,
                                        DSpaceObject item)
                                 throws IdentifierException
        Create and apply an identifier to a DSpaceObject.
        Parameters:
        context - The relevant DSpace Context.
        item - object to be named.
        Returns:
        existing identifier of item if it has one, else a new identifier.
        Throws:
        IdentifierException - if identifier error
      • mint

        public abstract String mint​(Context context,
                                    DSpaceObject dso)
                             throws IdentifierException
        Create an identifier for a DSpaceObject.
        Parameters:
        context - The relevant DSpace Context.
        dso - object to be named.
        Returns:
        existing identifier of dso if it has one, else a new identifier.
        Throws:
        IdentifierException - if identifier error
      • delete

        public abstract void delete​(Context context,
                                    DSpaceObject dso)
                             throws IdentifierException
        Unbind this type of identifier(s) from an object.
        Parameters:
        context - The relevant DSpace Context.
        dso - object to lose its identity.
        Throws:
        IdentifierException - if identifier error
      • delete

        public abstract void delete​(Context context,
                                    DSpaceObject dso,
                                    String identifier)
                             throws IdentifierException
        Unbind the given identifier from an object.
        Parameters:
        context - The relevant DSpace Context.
        dso - object to be de-identified.
        identifier - to be removed.
        Throws:
        IdentifierException - if identifier error
      • reserve

        public abstract void reserve​(Context context,
                                     DSpaceObject dso,
                                     String identifier)
                              throws IdentifierException
        Set an object's identifier.
        Parameters:
        context - The relevant DSpace Context.
        dso - object to be identified.
        identifier - to be set on the object.
        Throws:
        IdentifierException - if identifier error
      • register

        public abstract void register​(Context context,
                                      DSpaceObject object,
                                      String identifier)
                               throws IdentifierException
        Create a specific identifier and apply it to an object.
        Parameters:
        context - The relevant DSpace Context.
        object - to be identified.
        identifier - to be created.
        Throws:
        IdentifierException - if identifier error