@Name(value="tagActions") @Scope(value=CONVERSATION) public class TagActionsBean extends Object implements Serializable
Modifier and Type | Field and Description |
---|---|
protected Boolean |
canSelectNewTag |
protected CoreSession |
documentManager |
static String |
DOCUMENTS_IMPORTED |
protected org.jboss.seam.faces.FacesMessages |
facesMessages |
protected String |
listLabel |
protected NavigationContext |
navigationContext |
protected ResourcesAccessor |
resourcesAccessor |
static String |
SELECTION_EDITED |
static String |
TAG_SEARCH_RESULT_PAGE |
Constructor and Description |
---|
TagActionsBean() |
Modifier and Type | Method and Description |
---|---|
String |
addTagging()
Performs the tagging on the current document.
|
void |
addTagsOnEvent(List<DocumentModel> documents,
DocumentModel docModel) |
boolean |
canModifyTag(Tag tag)
Returns true if the current logged user has permission to modify a tag that is applied on the current
document.
|
protected static String |
cleanLabel(String label) |
void |
documentChanged() |
boolean |
getAddTag() |
DocumentModelList |
getChildrenSelectModel() |
List<Tag> |
getDocumentTags()
Returns the list with distinct public tags (or owned by user) that are applied on the current document.
|
String |
getListLabel() |
List<Tag> |
getPopularCloudOnAllDocuments()
Returns tag cloud info for the whole repository.
|
List<Tag> |
getSuggestions(Object input) |
String |
getTagLabel() |
protected TagService |
getTagService() |
boolean |
isTagServiceEnabled() |
String |
listDocumentsForTag(String listLabel) |
String |
removeTagging(String label)
Removes a tagging from the current document.
|
void |
reset()
Resets the fields that are used for managing actions related to tagging.
|
void |
setAddTag(boolean addTag) |
void |
setListLabel(String listLabel) |
void |
setTagLabel(String tagLabel) |
void |
showAddTag(javax.faces.event.ActionEvent event)
Used to decide whether the tagging UI field is shown or not.
|
public static final String TAG_SEARCH_RESULT_PAGE
public static final String SELECTION_EDITED
public static final String DOCUMENTS_IMPORTED
@In(create=true, required=false) protected transient CoreSession documentManager
@In(create=true) protected NavigationContext navigationContext
@In(create=true, required=false) protected transient org.jboss.seam.faces.FacesMessages facesMessages
@In(create=true) protected transient ResourcesAccessor resourcesAccessor
@RequestParameter protected Boolean canSelectNewTag
public TagActionsBean()
@Factory(value="tagServiceEnabled", scope=APPLICATION) public boolean isTagServiceEnabled()
protected TagService getTagService()
@Factory(value="currentDocumentTags", scope=EVENT) public List<Tag> getDocumentTags()
public String addTagging()
public String removeTagging(String label)
@Factory(value="tagCloudOnAllDocuments", scope=EVENT) public List<Tag> getPopularCloudOnAllDocuments()
public String listDocumentsForTag(String listLabel)
@Factory(value="taggedDocuments", scope=EVENT) public DocumentModelList getChildrenSelectModel()
public String getListLabel()
public void setListLabel(String listLabel)
public boolean canModifyTag(Tag tag)
public void reset()
public void showAddTag(javax.faces.event.ActionEvent event)
public String getTagLabel()
public void setTagLabel(String tagLabel)
public boolean getAddTag()
public void setAddTag(boolean addTag)
public List<Tag> getSuggestions(Object input)
protected static String cleanLabel(String label)
@Observer(value={"selectionEdited","documentImported"}) public void addTagsOnEvent(List<DocumentModel> documents, DocumentModel docModel)
@Observer(value="documentSelectionChanged", create=false) @BypassInterceptors public void documentChanged()
Copyright © 2017 Nuxeo. All rights reserved.