Interface FormsOnlineService
-
- All Superinterfaces:
org.silverpeas.core.ApplicationService
- All Known Implementing Classes:
DefaultFormsOnlineService
public interface FormsOnlineService extends org.silverpeas.core.ApplicationService
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description voidarchiveRequest(RequestPK pk)Archives the request represented by the given identifier.voidcancelRequest(RequestPK pk)Cancels the request represented by the given identifier.booleandeleteForm(FormPK pk)voiddeleteRequest(RequestPK pk)Deletes the request represented by the given identifier.static FormsOnlineServiceget()List<FormDetail>getAllForms(String appId, String userId, boolean withSendInfo)RequestsByStatusgetAllUserRequests(String appId, String userId, org.silverpeas.core.admin.PaginationPage paginationPage)List<FormDetail>getAvailableFormsToSend(Collection<String> appIds, String userId, String orderBy)Optional<FormInstance>getContributionById(org.silverpeas.core.contribution.model.ContributionIdentifier contributionId)Map<String,Set<FormInstanceValidationType>>getValidatorFormIdsWithValidationTypes(String appId, String validatorId, Collection<String> formIds)Gets theFormInstanceValidationTypeinstances mapped by form identifiers of the validator represented by given validator id and validator group ids on the given component instance.RequestsByStatusgetValidatorRequests(RequestsFilter filter, String validatorId, org.silverpeas.core.admin.PaginationPage paginationPage)voidindex(String componentId)FormDetailloadForm(FormPK pk)FormInstanceloadRequest(RequestPK pk, String userId)FormInstanceloadRequest(RequestPK pk, String userId, boolean editionMode)voidpublishForm(FormPK pk)FormDetailsaveForm(FormDetail form, Map<String,org.silverpeas.core.util.Pair<List<String>,List<String>>> userAndGroupIdsByRightTypes)voidsaveNextRequestValidationStep(RequestPK pk, String validatorId, String decision, String comment, boolean follower)Register a step of validation of the request represented by the given identifier.voidsaveRequest(FormPK pk, String userId, List<org.apache.commons.fileupload.FileItem> items, boolean draft)voidunpublishForm(FormPK pk)
-
-
-
Method Detail
-
get
static FormsOnlineService get()
-
getContributionById
Optional<FormInstance> getContributionById(org.silverpeas.core.contribution.model.ContributionIdentifier contributionId)
- Specified by:
getContributionByIdin interfaceorg.silverpeas.core.ApplicationService
-
getAllForms
List<FormDetail> getAllForms(String appId, String userId, boolean withSendInfo) throws FormsOnlineException
- Throws:
FormsOnlineException
-
loadForm
FormDetail loadForm(FormPK pk) throws FormsOnlineException
- Throws:
FormsOnlineException
-
saveForm
FormDetail saveForm(FormDetail form, Map<String,org.silverpeas.core.util.Pair<List<String>,List<String>>> userAndGroupIdsByRightTypes) throws FormsOnlineException
- Throws:
FormsOnlineException
-
deleteForm
boolean deleteForm(FormPK pk) throws FormsOnlineException
- Throws:
FormsOnlineException
-
publishForm
void publishForm(FormPK pk) throws FormsOnlineException
- Throws:
FormsOnlineException
-
unpublishForm
void unpublishForm(FormPK pk) throws FormsOnlineException
- Throws:
FormsOnlineException
-
getAvailableFormsToSend
List<FormDetail> getAvailableFormsToSend(Collection<String> appIds, String userId, String orderBy) throws FormsOnlineException
- Throws:
FormsOnlineException
-
getAllUserRequests
RequestsByStatus getAllUserRequests(String appId, String userId, org.silverpeas.core.admin.PaginationPage paginationPage) throws FormsOnlineException
- Throws:
FormsOnlineException
-
getValidatorRequests
RequestsByStatus getValidatorRequests(RequestsFilter filter, String validatorId, org.silverpeas.core.admin.PaginationPage paginationPage) throws FormsOnlineException
- Throws:
FormsOnlineException
-
getValidatorFormIdsWithValidationTypes
Map<String,Set<FormInstanceValidationType>> getValidatorFormIdsWithValidationTypes(String appId, String validatorId, Collection<String> formIds) throws FormsOnlineException
Gets theFormInstanceValidationTypeinstances mapped by form identifiers of the validator represented by given validator id and validator group ids on the given component instance.- Parameters:
appId- the identifier of the component instance.validatorId- the identifier of the validator.formIds- optional filter about form identifiers in order to reduce the search load.- Returns:
FormInstanceValidationTypeinstances mapped by form identifiers.- Throws:
FormsOnlineException- if an error occurs
-
loadRequest
FormInstance loadRequest(RequestPK pk, String userId) throws FormsOnlineException, org.silverpeas.core.contribution.template.publication.PublicationTemplateException, org.silverpeas.core.contribution.content.form.FormException
- Throws:
FormsOnlineExceptionorg.silverpeas.core.contribution.template.publication.PublicationTemplateExceptionorg.silverpeas.core.contribution.content.form.FormException
-
loadRequest
FormInstance loadRequest(RequestPK pk, String userId, boolean editionMode) throws FormsOnlineException
- Throws:
FormsOnlineException
-
saveRequest
void saveRequest(FormPK pk, String userId, List<org.apache.commons.fileupload.FileItem> items, boolean draft) throws FormsOnlineException
- Throws:
FormsOnlineException
-
saveNextRequestValidationStep
void saveNextRequestValidationStep(RequestPK pk, String validatorId, String decision, String comment, boolean follower) throws FormsOnlineException
Register a step of validation of the request represented by the given identifier.The service ensure that the validator is able to validate the given request. In case of the validator can not validate, an error is thrown.
- Parameters:
pk- the unique identifier of the aimed request.validatorId- the identifier of the validator.decision- the validation decision ("validate" or "refused")comment- the validation comment.follower- a boolean flag. True means that the validator want to follow the next steps of validation.- Throws:
FormsOnlineException- if the validator can not validate indeed or on technical error.
-
cancelRequest
void cancelRequest(RequestPK pk) throws FormsOnlineException
Cancels the request represented by the given identifier.The service ensures that the current user is the creator of the request. In case of the validator can not validate, an error is thrown.
- Parameters:
pk- the unique identifier of the aimed request.- Throws:
FormsOnlineException- if the current user can not cancel the request or on technical error.
-
archiveRequest
void archiveRequest(RequestPK pk) throws FormsOnlineException
Archives the request represented by the given identifier.The service ensures that the current user is able to archive the request. In case of the validator can not validate, an error is thrown.
- Parameters:
pk- the unique identifier of the aimed request.- Throws:
FormsOnlineException- if the current user can not archive the request or on technical error.
-
deleteRequest
void deleteRequest(RequestPK pk) throws FormsOnlineException
Deletes the request represented by the given identifier.The service ensures that the current user is able to delete the request. In case of the validator can not validate, an error is thrown.
- Parameters:
pk- the unique identifier of the aimed request.- Throws:
FormsOnlineException- if the current user can not delete the request or on technical error.
-
index
void index(String componentId)
-
-