Package org.dspace.app.rest.repository
Class ScriptRestRepository
- java.lang.Object
-
- org.dspace.app.rest.repository.AbstractDSpaceRestRepository
-
- org.dspace.app.rest.repository.DSpaceRestRepository<ScriptRest,String>
-
- org.dspace.app.rest.repository.ScriptRestRepository
-
- All Implemented Interfaces:
org.springframework.data.repository.CrudRepository<ScriptRest,String>,org.springframework.data.repository.PagingAndSortingRepository<ScriptRest,String>,org.springframework.data.repository.Repository<ScriptRest,String>
@Component("system.script") public class ScriptRestRepository extends DSpaceRestRepository<ScriptRest,String>This is the REST repository dealing with the Script logic
-
-
Field Summary
-
Fields inherited from class org.dspace.app.rest.repository.AbstractDSpaceRestRepository
converter, requestService, utils
-
-
Constructor Summary
Constructors Constructor Description ScriptRestRepository()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.springframework.data.domain.Page<ScriptRest>findAll(org.dspace.core.Context context, org.springframework.data.domain.Pageable pageable)Method to implement to support scroll of entity instances from the collection resource endpointScriptRestfindOne(org.dspace.core.Context context, String name)Method to implement to support retrieval of a specific REST object instanceClass<ScriptRest>getDomainClass()The REST model supported by the repositoryProcessReststartProcess(org.dspace.core.Context context, String scriptName, List<org.springframework.web.multipart.MultipartFile> files)This method will take a String scriptname parameter and it'll try to resolve this to a script known by DSpace.-
Methods inherited from class org.dspace.app.rest.repository.DSpaceRestRepository
action, action, count, createAndReturn, createAndReturn, createAndReturn, createAndReturn, createAndReturn, createAndReturn, delete, delete, deleteAll, deleteAll, deleteById, existsById, findAll, findAll, findAll, findAllById, findById, patch, patch, put, put, put, put, save, save, saveAll, upload, upload, upload
-
Methods inherited from class org.dspace.app.rest.repository.AbstractDSpaceRestRepository
getRequestService, obtainContext
-
-
-
-
Method Detail
-
findOne
@PreAuthorize("hasAuthority(\'ADMIN\')") public ScriptRest findOne(org.dspace.core.Context context, String name)Description copied from class:DSpaceRestRepositoryMethod to implement to support retrieval of a specific REST object instance- Specified by:
findOnein classDSpaceRestRepository<ScriptRest,String>- Parameters:
context- the dspace contextname- the rest object id- Returns:
- the REST object identified by its ID
-
findAll
@PreAuthorize("hasAuthority(\'ADMIN\')") public org.springframework.data.domain.Page<ScriptRest> findAll(org.dspace.core.Context context, org.springframework.data.domain.Pageable pageable)Description copied from class:DSpaceRestRepositoryMethod to implement to support scroll of entity instances from the collection resource endpoint- Specified by:
findAllin classDSpaceRestRepository<ScriptRest,String>- Parameters:
context- the dspace contextpageable- object embedding the requested pagination info- Returns:
-
getDomainClass
public Class<ScriptRest> getDomainClass()
Description copied from class:DSpaceRestRepositoryThe REST model supported by the repository- Specified by:
getDomainClassin classDSpaceRestRepository<ScriptRest,String>
-
startProcess
public ProcessRest startProcess(org.dspace.core.Context context, String scriptName, List<org.springframework.web.multipart.MultipartFile> files) throws SQLException, IOException, org.dspace.authorize.AuthorizeException, IllegalAccessException, InstantiationException
This method will take a String scriptname parameter and it'll try to resolve this to a script known by DSpace. If a script is found, it'll start a process for this script with the given properties to this request- Parameters:
scriptName- The name of the script that will try to be resolved and started- Returns:
- A ProcessRest object representing the started process for this script
- Throws:
SQLException- If something goes wrongIOException- If something goes wrongorg.dspace.authorize.AuthorizeExceptionIllegalAccessExceptionInstantiationException
-
-