Interface ClassifiedService
- All Superinterfaces:
org.silverpeas.core.ApplicationService
- All Known Implementing Classes:
DefaultClassifiedService
public interface ClassifiedService
extends org.silverpeas.core.ApplicationService
Services provided by the Classified Silverpeas component.
It has to be managed by the IoC container under the name classifiedService.
-
Method Summary
Modifier and TypeMethodDescriptioncreateClassified(ClassifiedDetail classified) create a classifiedvoidcreateSubscribe(Subscribe subscribe) create a subscriptionvoiddeleteAllClassifieds(String instanceId) delete all classifieds for the instance corresponding to instanceIdvoiddeleteAllSubscribes(String instanceId) delete all subscriptions for the instance corresponding to instanceIdvoiddeleteClassified(org.silverpeas.core.contribution.model.ContributionIdentifier classifiedId) delete the classified corresponding to classifiedIdvoiddeleteSubscribe(String subscribeId) delete a subscription corresponding to subscribeIdvoiddraftInClassified(org.silverpeas.core.contribution.model.ContributionIdentifier classifiedId) pass the classified corresponding to classifiedId in draft modevoiddraftOutClassified(org.silverpeas.core.contribution.model.ContributionIdentifier classifiedId, String profile, boolean isValidationEnabled) take out draft mode the classified corresponding to classifiedgetAllClassifieds(String instanceId) get all classifieds for an instance corresponding to instanceIdgetAllClassifiedsToUnpublish(int nbDays, String instanceId) get all expiring classifieds (corresponding of a number of day nbDays)getAllValidClassifieds(String instanceId) getAllValidClassifieds(String instanceId, String searchField1, String searchField2, int firstItemIndex, int elementsPerPage) get all valid classifiedsgetClassifiedsByUser(String instanceId, String userId) get all classifieds for user and instance corresponding to userId and instanceIdgetClassifiedsToValidate(String instanceId) get all classifieds to validate for an instance corresponding to instanceIdgetContributionById(org.silverpeas.core.contribution.model.ContributionIdentifier classifiedId) getNbTotalClassifieds(String instanceId) get the number of classifieds for an instance corresponding to instanceIdgetSubscribesByUser(String instanceId, String userId) get all subscriptions for user and instance corresponding to userId and instanceIdgetUsersBySubscribe(String instanceId, String field1, String field2) get all subscribing users to a search corresponding to fields field1 and field2voidindexClassifieds(String instanceId) index all the classifieds for the instance corresponding to instanceIdvoidrefusedClassified(org.silverpeas.core.contribution.model.ContributionIdentifier classifiedId, String userId, String refusalMotive) pass to status refused because the user corresponding to userId refused the classified corresponding to classifiedId for the given motive.search(org.silverpeas.core.index.search.model.QueryDescription query) search all classifieds corresponding to the queryvoidsendSubscriptionsNotification(String field1, String field2, ClassifiedDetail classified) send a notification for subscribers to field1 and field2 when classified modifiedvoidsetClassification(ClassifiedDetail classified, String searchField1, String searchField2, String xmlFormName) voidunpublishClassified(org.silverpeas.core.contribution.model.ContributionIdentifier classifiedId) Unpublish a subscription corresponding to classifiedIdvoidupdateClassified(ClassifiedDetail classified, boolean notify) update the classified and send notification if notify is truevoidvalidateClassified(org.silverpeas.core.contribution.model.ContributionIdentifier classifiedId, String userId) pass to status validate because the user corresponding to userId validated the classified corresponding to classifiedIdMethods inherited from interface org.silverpeas.core.ApplicationService
getComponentMessages, getComponentSettings, isRelatedTo
-
Method Details
-
getContributionById
Optional<ClassifiedDetail> getContributionById(org.silverpeas.core.contribution.model.ContributionIdentifier classifiedId) - Specified by:
getContributionByIdin interfaceorg.silverpeas.core.ApplicationService
-
createClassified
create a classified- Parameters:
classified- : ClassifiedDetail- Returns:
- classifiedId : String
-
updateClassified
update the classified and send notification if notify is true- Parameters:
classified- : ClassifiedDetailnotify- : boolean
-
deleteClassified
void deleteClassified(org.silverpeas.core.contribution.model.ContributionIdentifier classifiedId) delete the classified corresponding to classifiedId- Parameters:
classifiedId- the unique identifier of the classified.
-
deleteAllClassifieds
delete all classifieds for the instance corresponding to instanceId- Parameters:
instanceId- : String
-
draftInClassified
void draftInClassified(org.silverpeas.core.contribution.model.ContributionIdentifier classifiedId) pass the classified corresponding to classifiedId in draft mode- Parameters:
classifiedId- the unique identifier of the classified
-
draftOutClassified
void draftOutClassified(org.silverpeas.core.contribution.model.ContributionIdentifier classifiedId, String profile, boolean isValidationEnabled) take out draft mode the classified corresponding to classified- Parameters:
classifiedId- the unique identifier of the classifiedprofile- a role profile of the user performing the action.isValidationEnabled- is the validation enabled?
-
getAllClassifieds
get all classifieds for an instance corresponding to instanceId- Parameters:
instanceId- : String- Returns:
- a collection of ClassifiedDetail
-
getClassifiedsByUser
get all classifieds for user and instance corresponding to userId and instanceId- Parameters:
instanceId- : StringuserId- : String- Returns:
- a collection of ClassifiedDetail
-
getNbTotalClassifieds
get the number of classifieds for an instance corresponding to instanceId- Parameters:
instanceId- : String- Returns:
- the number of classified : String
-
getClassifiedsToValidate
get all classifieds to validate for an instance corresponding to instanceId- Parameters:
instanceId- : String- Returns:
- a Collection of ClassifiedDetail
-
refusedClassified
void refusedClassified(org.silverpeas.core.contribution.model.ContributionIdentifier classifiedId, String userId, String refusalMotive) pass to status refused because the user corresponding to userId refused the classified corresponding to classifiedId for the given motive.- Parameters:
classifiedId- unique identifier of a classifieduserId- unique identifier of the user refusing the classifiedrefusalMotive- the text about the motive of the refusal
-
validateClassified
void validateClassified(org.silverpeas.core.contribution.model.ContributionIdentifier classifiedId, String userId) pass to status validate because the user corresponding to userId validated the classified corresponding to classifiedId- Parameters:
classifiedId- the unique identifier of a classified.userId- the unique identifier of the user validating the classified.
-
search
search all classifieds corresponding to the query- Parameters:
query- the query from which the search will be performed.- Returns:
- a collection of ClassifiedDetail
-
indexClassifieds
index all the classifieds for the instance corresponding to instanceId- Parameters:
instanceId- : String
-
getAllClassifiedsToUnpublish
get all expiring classifieds (corresponding of a number of day nbDays)- Parameters:
nbDays- : intinstanceId- : classified component instance id- Returns:
- a collection of ClassifiedDetail
-
createSubscribe
create a subscription- Parameters:
subscribe- : Subscribe
-
deleteSubscribe
delete a subscription corresponding to subscribeId- Parameters:
subscribeId- : String
-
unpublishClassified
void unpublishClassified(org.silverpeas.core.contribution.model.ContributionIdentifier classifiedId) Unpublish a subscription corresponding to classifiedId- Parameters:
classifiedId- the unique identifier of a classified
-
getSubscribesByUser
get all subscriptions for user and instance corresponding to userId and instanceId- Parameters:
instanceId- : StringuserId- : String- Returns:
- a collection of Subscribe
-
getUsersBySubscribe
get all subscribing users to a search corresponding to fields field1 and field2- Parameters:
field1- : Stringfield2- : String- Returns:
- a collection of userId (String)
-
deleteAllSubscribes
delete all subscriptions for the instance corresponding to instanceId- Parameters:
instanceId- unique identifier of a component instance.
-
sendSubscriptionsNotification
send a notification for subscribers to field1 and field2 when classified modified- Parameters:
field1- the first classified fieldfield2- the second classified field
-
getAllValidClassifieds
List<ClassifiedDetail> getAllValidClassifieds(String instanceId, String searchField1, String searchField2, int firstItemIndex, int elementsPerPage) get all valid classifieds- Parameters:
instanceId- : StringsearchField1- : name of the search field 1searchField2- : name of the search field 2firstItemIndex- : index of first item to displayelementsPerPage- : the number of items to render per page- Returns:
- a collection of ClassifiedDetail
-
getAllValidClassifieds
-
setClassification
void setClassification(ClassifiedDetail classified, String searchField1, String searchField2, String xmlFormName)
-