Package org.dspace.content
Class EntityTypeServiceImpl
- java.lang.Object
-
- org.dspace.content.EntityTypeServiceImpl
-
- All Implemented Interfaces:
EntityTypeService,DSpaceCRUDService<EntityType>
public class EntityTypeServiceImpl extends Object implements EntityTypeService
-
-
Field Summary
Fields Modifier and Type Field Description protected AuthorizeServiceauthorizeServiceprotected EntityTypeDAOentityTypeDAO
-
Constructor Summary
Constructors Constructor Description EntityTypeServiceImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description EntityTypecreate(Context context)EntityTypecreate(Context context, String entityTypeString)This method creates an EntityType object in the database with the given entityTypeString as it's labelvoiddelete(Context context, EntityType entityType)EntityTypefind(Context context, int id)List<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 labelvoidupdate(Context context, List<EntityType> entityTypes)voidupdate(Context context, EntityType entityType)
-
-
-
Field Detail
-
entityTypeDAO
@Autowired(required=true) protected EntityTypeDAO entityTypeDAO
-
authorizeService
@Autowired(required=true) protected AuthorizeService authorizeService
-
-
Method Detail
-
findByEntityType
public EntityType findByEntityType(Context context, String entityType) throws SQLException
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
public List<EntityType> findAll(Context context) throws SQLException
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
public List<EntityType> findAll(Context context, Integer limit, Integer offset) throws SQLException
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
public EntityType create(Context context) throws SQLException, AuthorizeException
- 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
public EntityType find(Context context, int id) throws SQLException
- Specified by:
findin interfaceDSpaceCRUDService<EntityType>- Throws:
SQLException
-
update
public void update(Context context, EntityType entityType) throws SQLException, AuthorizeException
- Specified by:
updatein interfaceDSpaceCRUDService<EntityType>- Throws:
SQLExceptionAuthorizeException
-
update
public void update(Context context, List<EntityType> entityTypes) throws SQLException, AuthorizeException
- Specified by:
updatein interfaceDSpaceCRUDService<EntityType>- Throws:
SQLExceptionAuthorizeException
-
delete
public void delete(Context context, EntityType entityType) throws SQLException, AuthorizeException
- Specified by:
deletein interfaceDSpaceCRUDService<EntityType>- Throws:
SQLExceptionAuthorizeException
-
-