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:
Aware,BeanNameAware,org.springframework.data.repository.CrudRepository<ScriptRest,,String> org.springframework.data.repository.PagingAndSortingRepository<ScriptRest,,String> org.springframework.data.repository.Repository<ScriptRest,String>
@Component("system.scripts")
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 -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.data.domain.Page<ScriptRest>Method to implement to support scroll of entity instances from the collection resource endpointMethod to implement to support retrieval of a specific REST object instanceThe REST model supported by the repositorystartProcess(Context context, String scriptName, List<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, deleteAllById, deleteById, existsById, findAll, findAll, findAll, findAllById, findById, patch, patch, put, put, put, put, save, save, saveAll, setBeanName, upload, upload, uploadMethods inherited from class org.dspace.app.rest.repository.AbstractDSpaceRestRepository
getRequestService, obtainContext
-
Constructor Details
-
ScriptRestRepository
public ScriptRestRepository()
-
-
Method Details
-
findOne
@PreAuthorize("hasAuthority(\'AUTHENTICATED\')") public ScriptRest findOne(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(\'AUTHENTICATED\')") public org.springframework.data.domain.Page<ScriptRest> findAll(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
Description copied from class:DSpaceRestRepositoryThe REST model supported by the repository- Specified by:
getDomainClassin classDSpaceRestRepository<ScriptRest,String>
-
startProcess
public ProcessRest startProcess(Context context, String scriptName, List<MultipartFile> files) throws SQLException, IOException, 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 wrongAuthorizeExceptionIllegalAccessExceptionInstantiationException
-