Nuxeo ECM Projects 5.4.3-SNAPSHOT

org.nuxeo.ecm.platform.tag.web
Class TagActionsBean

java.lang.Object
  extended by org.nuxeo.ecm.platform.tag.web.TagActionsBean
All Implemented Interfaces:
Serializable

@Name(value="tagActions")
@Scope(value=CONVERSATION)
public class TagActionsBean
extends Object
implements Serializable

This Seam bean provides support for tagging related actions which can be made on the current document.

See Also:
Serialized Form

Field Summary
static String TAG_SEARCH_RESULT_PAGE
           
 
Constructor Summary
TagActionsBean()
           
 
Method Summary
 String addTagging()
          Performs the tagging on the current document.
 boolean canModifyTag(Tag tag)
          Returns true if the current logged user has permission to modify a tag that is applied on the current document.
 void documentChanged()
           
 boolean getAddTag()
           
 DocumentModelList getChildrenSelectModel()
           
static String getDocIdForTag(DocumentModel doc)
          Gets the doc id to use with the tag service for a given document.
 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()
           
 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 setTagLabel(String tagLabel)
           
 void showAddTag(ActionEvent event)
          Used to decide whether the tagging UI field is shown or not.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TAG_SEARCH_RESULT_PAGE

public static final String TAG_SEARCH_RESULT_PAGE
See Also:
Constant Field Values
Constructor Detail

TagActionsBean

public TagActionsBean()
Method Detail

isTagServiceEnabled

@Factory(value="tagServiceEnabled",
         scope=APPLICATION)
public boolean isTagServiceEnabled()
                            throws ClientException
Throws:
ClientException

getDocumentTags

@Factory(value="currentDocumentTags",
         scope=EVENT)
public List<Tag> getDocumentTags()
                          throws ClientException
Returns the list with distinct public tags (or owned by user) that are applied on the current document.

Throws:
ClientException

getDocIdForTag

public static String getDocIdForTag(DocumentModel doc)
Gets the doc id to use with the tag service for a given document.

Proxies are not tagged directly, their underlying document is.


addTagging

public String addTagging()
                  throws ClientException
Performs the tagging on the current document.

Throws:
ClientException

removeTagging

public String removeTagging(String label)
                     throws ClientException
Removes a tagging from the current document.

Throws:
ClientException

getPopularCloudOnAllDocuments

@Factory(value="tagCloudOnAllDocuments",
         scope=EVENT)
public List<Tag> getPopularCloudOnAllDocuments()
                                        throws ClientException
Returns tag cloud info for the whole repository. For performance reasons, the security on underlying documents is not tested.

Throws:
ClientException

listDocumentsForTag

public String listDocumentsForTag(String listLabel)
                           throws ClientException
Throws:
ClientException

getChildrenSelectModel

@Factory(value="taggedDocuments",
         scope=EVENT)
public DocumentModelList getChildrenSelectModel()
                                         throws ClientException
Throws:
ClientException

getListLabel

public String getListLabel()

canModifyTag

public boolean canModifyTag(Tag tag)
Returns true if the current logged user has permission to modify a tag that is applied on the current document.


reset

public void reset()
Resets the fields that are used for managing actions related to tagging.


showAddTag

public void showAddTag(ActionEvent event)
Used to decide whether the tagging UI field is shown or not.


getTagLabel

public String getTagLabel()

setTagLabel

public void setTagLabel(String tagLabel)

getAddTag

public boolean getAddTag()

setAddTag

public void setAddTag(boolean addTag)

getSuggestions

public List<Tag> getSuggestions(Object input)
                         throws ClientException
Throws:
ClientException

documentChanged

@Observer(value="documentSelectionChanged",
          create=false)
@BypassInterceptors
public void documentChanged()

Nuxeo ECM Projects 5.4.3-SNAPSHOT

Copyright © 2011 Nuxeo SAS. All Rights Reserved.