Interface FormsOnlineService
- All Superinterfaces:
org.silverpeas.core.ApplicationService
- All Known Implementing Classes:
DefaultFormsOnlineService
public interface FormsOnlineService
extends org.silverpeas.core.ApplicationService
-
Method Summary
Modifier and TypeMethodDescriptionvoidArchives the request represented by the given identifier.voidCancels the request represented by the given identifier.booleandeleteForm(FormPK pk) voidDeletes the request represented by the given identifier.static FormsOnlineServiceget()getAllForms(String appId, String userId, boolean withSendInfo) getAllUserRequests(String appId, String userId, org.silverpeas.core.admin.PaginationPage paginationPage) getAvailableFormsToSend(Collection<String> appIds, String userId, String orderBy) getContributionById(org.silverpeas.core.contribution.model.ContributionIdentifier contributionId) 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.getValidatorRequests(RequestsFilter filter, String validatorId, org.silverpeas.core.admin.PaginationPage paginationPage) voidloadRequest(RequestPK pk, String userId) loadRequest(RequestPK pk, String userId, boolean editionMode) voidpublishForm(FormPK pk) saveForm(FormDetail form, Map<String, org.silverpeas.kernel.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.silverpeas.core.util.file.FileItem> items, boolean draft) voidunpublishForm(FormPK pk) Methods inherited from interface org.silverpeas.core.ApplicationService
getComponentMessages, getComponentSettings, isRelatedTo
-
Method Details
-
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
- Throws:
FormsOnlineException
-
saveForm
FormDetail saveForm(FormDetail form, Map<String, org.silverpeas.kernel.util.Pair<List<String>, throws FormsOnlineExceptionList<String>>> userAndGroupIdsByRightTypes) - Throws:
FormsOnlineException
-
deleteForm
- Throws:
FormsOnlineException
-
publishForm
- Throws:
FormsOnlineException
-
unpublishForm
- 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.silverpeas.core.util.file.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
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
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
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
-