Interface ClassifiedService
-
- All Superinterfaces:
org.silverpeas.core.ApplicationService
- All Known Implementing Classes:
DefaultClassifiedService
public interface ClassifiedService extends org.silverpeas.core.ApplicationServiceServices provided by the Classified Silverpeas component. It has to be managed by the IoC container under the name classifiedService.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description StringcreateClassified(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 classifiedCollection<ClassifiedDetail>getAllClassifieds(String instanceId)get all classifieds for an instance corresponding to instanceIdCollection<ClassifiedDetail>getAllClassifiedsToUnpublish(int nbDays, String instanceId)get all expiring classifieds (corresponding of a number of day nbDays)List<ClassifiedDetail>getAllValidClassifieds(String instanceId)List<ClassifiedDetail>getAllValidClassifieds(String instanceId, Map<String,String> mapFields1, Map<String,String> mapFields2, String searchField1, String searchField2, int firstItemIndex, int elementsPerPage)get all valid classifiedsList<ClassifiedDetail>getClassifiedsByUser(String instanceId, String userId)get all classifieds for user and instance corresponding to userId and instanceIdList<ClassifiedDetail>getClassifiedsToValidate(String instanceId)get all classifieds to validate for an instance corresponding to instanceIdOptional<ClassifiedDetail>getContributionById(org.silverpeas.core.contribution.model.ContributionIdentifier classifiedId)StringgetNbTotalClassifieds(String instanceId)get the number of classifieds for an instance corresponding to instanceIdCollection<Subscribe>getSubscribesByUser(String instanceId, String userId)get all subscriptions for user and instance corresponding to userId and instanceIdCollection<String>getUsersBySubscribe(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.List<ClassifiedDetail>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 classifiedId
-
-
-
Method Detail
-
getContributionById
Optional<ClassifiedDetail> getContributionById(org.silverpeas.core.contribution.model.ContributionIdentifier classifiedId)
- Specified by:
getContributionByIdin interfaceorg.silverpeas.core.ApplicationService
-
createClassified
String createClassified(ClassifiedDetail classified)
create a classified- Parameters:
classified- : ClassifiedDetail- Returns:
- classifiedId : String
-
updateClassified
void updateClassified(ClassifiedDetail classified, boolean notify)
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
void deleteAllClassifieds(String instanceId)
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
Collection<ClassifiedDetail> getAllClassifieds(String instanceId)
get all classifieds for an instance corresponding to instanceId- Parameters:
instanceId- : String- Returns:
- a collection of ClassifiedDetail
-
getClassifiedsByUser
List<ClassifiedDetail> getClassifiedsByUser(String instanceId, String userId)
get all classifieds for user and instance corresponding to userId and instanceId- Parameters:
instanceId- : StringuserId- : String- Returns:
- a collection of ClassifiedDetail
-
getNbTotalClassifieds
String getNbTotalClassifieds(String instanceId)
get the number of classifieds for an instance corresponding to instanceId- Parameters:
instanceId- : String- Returns:
- the number of classified : String
-
getClassifiedsToValidate
List<ClassifiedDetail> getClassifiedsToValidate(String instanceId)
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
List<ClassifiedDetail> search(org.silverpeas.core.index.search.model.QueryDescription query)
search all classifieds corresponding to the query- Parameters:
query- the query from which the search will be performed.- Returns:
- a collection of ClassifiedDetail
-
indexClassifieds
void indexClassifieds(String instanceId)
index all the classifieds for the instance corresponding to instanceId- Parameters:
instanceId- : String
-
getAllClassifiedsToUnpublish
Collection<ClassifiedDetail> getAllClassifiedsToUnpublish(int nbDays, String instanceId)
get all expiring classifieds (corresponding of a number of day nbDays)- Parameters:
nbDays- : intinstanceId- : classified component instance id- Returns:
- a collection of ClassifiedDetail
-
createSubscribe
void createSubscribe(Subscribe subscribe)
create a subscription- Parameters:
subscribe- : Subscribe
-
deleteSubscribe
void deleteSubscribe(String subscribeId)
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
Collection<Subscribe> getSubscribesByUser(String instanceId, String userId)
get all subscriptions for user and instance corresponding to userId and instanceId- Parameters:
instanceId- : StringuserId- : String- Returns:
- a collection of Subscribe
-
getUsersBySubscribe
Collection<String> getUsersBySubscribe(String field1, String field2)
get all subscribing users to a search corresponding to fields field1 and field2- Parameters:
field1- : Stringfield2- : String- Returns:
- a collection of userId (String)
-
deleteAllSubscribes
void deleteAllSubscribes(String instanceId)
delete all subscriptions for the instance corresponding to instanceId- Parameters:
instanceId- unique identifier of a component instance.
-
sendSubscriptionsNotification
void sendSubscriptionsNotification(String field1, String field2, ClassifiedDetail classified)
send a notification for subscribers to field1 and field2 when classified modified- Parameters:
field1- : stringfield2- : Stringclassified- : ClassifiedDetail
-
getAllValidClassifieds
List<ClassifiedDetail> getAllValidClassifieds(String instanceId, Map<String,String> mapFields1, Map<String,String> mapFields2, String searchField1, String searchField2, int firstItemIndex, int elementsPerPage)
get all valid classifieds- Parameters:
instanceId- : StringmapFields1- : HashMap des champs de recherche 1mapFields2- : HashMap des champs de recherche 1searchField1- : champ de recherche 1searchField2- : champ de recherche 2firstItemIndex- : index of first item to displayelementsPerPage- : nombre d'éléments à afficher par page- Returns:
- a collection of ClassifiedDetail
-
getAllValidClassifieds
List<ClassifiedDetail> getAllValidClassifieds(String instanceId)
-
setClassification
void setClassification(ClassifiedDetail classified, String searchField1, String searchField2, String xmlFormName)
-
-