Package org.dspace.content.service
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 Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description intcountEntityTypesByNames(Context context, List<String> names)EntityTypecreate(Context context, String entityTypeString)This method creates an EntityType object in the database with the given entityTypeString as it's labelList<EntityType>findAll(Context context)Retrieves all the EntityType objects currently in the systemList<EntityType>findAll(Context context, Integer limit, Integer offset)Retrieves all the EntityType objects currently in the systemEntityTypefindByEntityType(Context context, String entityType)Retrieves the EntityType that has the entityType String parameter as labelList<EntityType>getEntityTypesByNames(Context context, List<String> names, Integer limit, Integer offset)List<String>getSubmitAuthorizedTypes(Context context)Retrieves all entity types related to the collections on which the current user can depositvoidinitDefaultEntityTypeNames(Context context)Initializes the EntityType names, and marks them "permanent".
-
-
-
Method Detail
-
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 contextentityType- 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 contextlimit- paging limitoffset- 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 contextentityTypeString- The label for the newly created EntityType- Returns:
- The newly created EntityType
- Throws:
SQLException- If something goes wrongAuthorizeException- 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 errororg.apache.solr.client.solrj.SolrServerException- If there is a problem in communicating with SolrIOException- If IO error
-
getEntityTypesByNames
List<EntityType> getEntityTypesByNames(Context context, List<String> names, Integer limit, Integer offset) throws SQLException
- Parameters:
context- DSpace context objectnames- List of Entity type names that you want to retrievelimit- paging limitoffset- 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 objectnames- 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 exceptionAuthorizeException- Authorization error
-
-