Interface EntityTypeService

All Superinterfaces:
DSpaceCRUDService<EntityType>
All Known Implementing Classes:
EntityTypeServiceImpl

public interface EntityTypeService extends DSpaceCRUDService<EntityType>
This Service is used to access the data for EntityTypes through the DAO objects
  • Method Details

    • findByEntityType

      EntityType findByEntityType(Context context, String entityType) throws SQLException
      Retrieves the EntityType that has the entityType String parameter as label
      Parameters:
      context - The relevant DSpace context
      entityType - The String label that has to match
      Returns:
      The EntityType that has a String
      Throws:
      SQLException - If something goes wrong
    • findAll

      List<EntityType> findAll(Context context) throws SQLException
      Retrieves all the EntityType objects currently in the system
      Parameters:
      context - The relevant DSpace context
      Returns:
      A list of all EntityType objects
      Throws:
      SQLException - If something goes wrong
    • findAll

      List<EntityType> findAll(Context context, Integer limit, Integer offset) throws SQLException
      Retrieves all the EntityType objects currently in the system
      Parameters:
      context - The relevant DSpace context
      limit - paging limit
      offset - paging offset
      Returns:
      A list of all EntityType objects
      Throws:
      SQLException - If something goes wrong
    • create

      EntityType create(Context context, String entityTypeString) throws SQLException, AuthorizeException
      This method creates an EntityType object in the database with the given entityTypeString as it's label
      Parameters:
      context - The relevant DSpace context
      entityTypeString - The label for the newly created EntityType
      Returns:
      The newly created EntityType
      Throws:
      SQLException - If something goes wrong
      AuthorizeException - If something geos wrong with authorizations
    • getSubmitAuthorizedTypes

      List<String> getSubmitAuthorizedTypes(Context context) throws SQLException, org.apache.solr.client.solrj.SolrServerException, IOException
      Retrieves all entity types related to the collections on which the current user can deposit
      Parameters:
      context - DSpace context object
      Returns:
      Throws:
      SQLException - If database error
      org.apache.solr.client.solrj.SolrServerException - If there is a problem in communicating with Solr
      IOException - If IO error
    • getEntityTypesByNames

      List<EntityType> getEntityTypesByNames(Context context, List<String> names, Integer limit, Integer offset) throws SQLException
      Parameters:
      context - DSpace context object
      names - List of Entity type names that you want to retrieve
      limit - paging limit
      offset - the position of the first result to return
      Returns:
      Throws:
      SQLException - if database error
    • countEntityTypesByNames

      int countEntityTypesByNames(Context context, List<String> names) throws SQLException
      Parameters:
      context - DSpace context object
      names - List of Entity type names that you want to retrieve
      Returns:
      Throws:
      SQLException - if database error
    • initDefaultEntityTypeNames

      void initDefaultEntityTypeNames(Context context) throws SQLException, AuthorizeException
      Initializes the EntityType names, and marks them "permanent".
      Parameters:
      context - DSpace context object
      Throws:
      SQLException - Database exception
      AuthorizeException - Authorization error