Package org.dspace.content
Class EntityTypeServiceImpl
java.lang.Object
org.dspace.content.EntityTypeServiceImpl
- All Implemented Interfaces:
EntityTypeService,DSpaceCRUDService<EntityType>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected AuthorizeServiceprotected EntityTypeDAOprotected GroupServiceprotected SolrSearchCore -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintcountEntityTypesByNames(Context context, List<String> names) This method creates an EntityType object in the database with the given entityTypeString as it's labelvoiddelete(Context context, EntityType entityType) Retrieves all the EntityType objects currently in the systemRetrieves all the EntityType objects currently in the systemfindByEntityType(Context context, String entityType) Retrieves the EntityType that has the entityType String parameter as labelgetSubmitAuthorizedTypes(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".voidupdate(Context context, List<EntityType> entityTypes) Persist a collection of model objects.voidupdate(Context context, EntityType entityType) Persist a model object.
-
Field Details
-
entityTypeDAO
-
authorizeService
-
groupService
-
solrSearchCore
-
-
Constructor Details
-
EntityTypeServiceImpl
public EntityTypeServiceImpl()
-
-
Method Details
-
findByEntityType
Description copied from interface:EntityTypeServiceRetrieves the EntityType that has the entityType String parameter as label- Specified by:
findByEntityTypein interfaceEntityTypeService- 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
Description copied from interface:EntityTypeServiceRetrieves all the EntityType objects currently in the system- Specified by:
findAllin interfaceEntityTypeService- Parameters:
context- The relevant DSpace context- Returns:
- A list of all EntityType objects
- Throws:
SQLException- If something goes wrong
-
findAll
Description copied from interface:EntityTypeServiceRetrieves all the EntityType objects currently in the system- Specified by:
findAllin interfaceEntityTypeService- Parameters:
context- The relevant DSpace contextlimit- paging limitoffset- paging offset- Returns:
- A list of all EntityType objects
- Throws:
SQLException- If something goes wrong
-
create
- Specified by:
createin interfaceDSpaceCRUDService<EntityType>- Throws:
SQLExceptionAuthorizeException
-
create
public EntityType create(Context context, String entityTypeString) throws SQLException, AuthorizeException Description copied from interface:EntityTypeServiceThis method creates an EntityType object in the database with the given entityTypeString as it's label- Specified by:
createin interfaceEntityTypeService- 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
-
find
- Specified by:
findin interfaceDSpaceCRUDService<EntityType>- Throws:
SQLException
-
update
Description copied from interface:DSpaceCRUDServicePersist a model object.- Specified by:
updatein interfaceDSpaceCRUDService<EntityType>entityType- object to be persisted.- Throws:
SQLException- passed through.AuthorizeException- passed through.
-
update
public void update(Context context, List<EntityType> entityTypes) throws SQLException, AuthorizeException Description copied from interface:DSpaceCRUDServicePersist a collection of model objects.- Specified by:
updatein interfaceDSpaceCRUDService<EntityType>entityTypes- object to be persisted.- Throws:
SQLException- passed through.AuthorizeException- passed through.
-
delete
- Specified by:
deletein interfaceDSpaceCRUDService<EntityType>- Throws:
SQLExceptionAuthorizeException
-
getSubmitAuthorizedTypes
public List<String> getSubmitAuthorizedTypes(Context context) throws SQLException, org.apache.solr.client.solrj.SolrServerException, IOException Description copied from interface:EntityTypeServiceRetrieves all entity types related to the collections on which the current user can deposit- Specified by:
getSubmitAuthorizedTypesin interfaceEntityTypeService- 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
public List<EntityType> getEntityTypesByNames(Context context, List<String> names, Integer limit, Integer offset) throws SQLException - Specified by:
getEntityTypesByNamesin interfaceEntityTypeService- 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
- Specified by:
countEntityTypesByNamesin interfaceEntityTypeService- Parameters:
context- DSpace context objectnames- List of Entity type names that you want to retrieve- Returns:
- Throws:
SQLException- if database error
-
initDefaultEntityTypeNames
Description copied from interface:EntityTypeServiceInitializes the EntityType names, and marks them "permanent".- Specified by:
initDefaultEntityTypeNamesin interfaceEntityTypeService- Parameters:
context- DSpace context object- Throws:
SQLException- Database exceptionAuthorizeException- Authorization error
-