com.dotmarketing.portlets.contentlet.ajax
Class ContentletAjax

java.lang.Object
  extended by com.dotmarketing.portlets.contentlet.ajax.ContentletAjax

public class ContentletAjax
extends java.lang.Object

Author:
David

Constructor Summary
ContentletAjax()
           
 
Method Summary
 java.lang.String cancelContentEdit(java.lang.String workingContentletInode, java.lang.String currentContentletInode, java.lang.String referer, java.lang.String language)
           
 java.util.ArrayList<java.lang.String[]> doSearchGlossaryTerm(java.lang.String valueToComplete, java.lang.String language)
           
 java.util.Map<java.lang.String,java.lang.Object> getContentletData(java.lang.String inode)
           
 java.util.List<java.util.Map<java.lang.String,java.lang.Object>> getContentletsData(java.lang.String inodesStr)
           
 java.util.Map<java.lang.String,java.lang.String> lockContent(java.lang.String contentletInode)
           
 java.util.List<java.util.Map<java.lang.String,java.lang.Object>> publishContentlets(java.util.List<java.lang.String> identifiersList, boolean isPublish, long languageId)
          Publishes or unpublishes contentlets from a given list of identifiers.
 void removeSiblingBinaryFromSession(java.lang.String fieldContentlet)
           
 java.util.Map<java.lang.String,java.lang.Object> saveContent(java.util.List<java.lang.String> formData, boolean isAutoSave, boolean isCheckin, boolean publish)
           
 java.util.Map<java.lang.String,java.lang.Object> saveContentProperties(java.lang.String inode, java.util.List<java.lang.String> formData, boolean isAutoSave, boolean isCheckin, boolean isPublish)
           
 java.util.List searchContentlet(java.lang.String structureInode, java.util.List<java.lang.String> fields, java.util.List<java.lang.String> categories, boolean showDeleted, boolean filterSystemHost, int page, int perPage, java.lang.String orderBy)
          This method is used by the backend to pull the content from the lucene index and also checks the user permissions to see the content
 java.util.List searchContentlets(java.lang.String structureInode, java.util.List<java.lang.String> fields, java.util.List<java.lang.String> categories, boolean showDeleted, boolean filterSystemHost, boolean filterUnpublish, boolean filterLocked, int page, int perPage, java.lang.String orderBy, java.lang.String modDateFrom, java.lang.String modDateTo)
           
 java.util.List searchContentlets(java.lang.String structureInode, java.util.List<java.lang.String> fields, java.util.List<java.lang.String> categories, boolean showDeleted, boolean filterSystemHost, boolean filterUnpublish, boolean filterLocked, int page, java.lang.String orderBy, java.lang.String modDateFrom, java.lang.String modDateTo)
           
 java.util.List searchContentlets(java.lang.String structureInode, java.util.List<java.lang.String> fields, java.util.List<java.lang.String> categories, boolean showDeleted, boolean filterSystemHost, int page, java.lang.String orderBy, java.lang.String modDateFrom, java.lang.String modDateTo)
           
 java.util.List searchContentlets(java.lang.String structureInode, java.util.List<java.lang.String> fields, java.util.List<java.lang.String> categories, boolean showDeleted, boolean filterSystemHost, int page, java.lang.String orderBy, java.lang.String modDateFrom, java.lang.String modDateTo, boolean saveLastSearch)
           
 java.util.List searchContentletsByUser(java.lang.String structureInode, java.util.List<java.lang.String> fields, java.util.List<java.lang.String> categories, boolean showDeleted, boolean filterSystemHost, boolean filterUnpublish, boolean filterLocked, int page, java.lang.String orderBy, int perPage, com.liferay.portal.model.User currentUser, javax.servlet.http.HttpSession sess, java.lang.String modDateFrom, java.lang.String modDateTo)
          This method is used by the backend to pull the content from the lucene index and also checks the user permissions to see the content
 java.util.Map<java.lang.String,java.lang.Object> searchFormWidget(java.lang.String formStructureInode)
          This method is used by the backend to pull from lucene index the form widgets if the widget doesn't exist then is created and also checks the user permissions to see the content
 java.util.Map<java.lang.String,java.lang.String> unlockContent(java.lang.String contentletInode)
           
 java.lang.String unrelateContent(java.lang.String contentletIdentifier, java.lang.String identifierToUnrelate, java.lang.String relationshipInode)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ContentletAjax

public ContentletAjax()
Method Detail

getContentletsData

public java.util.List<java.util.Map<java.lang.String,java.lang.Object>> getContentletsData(java.lang.String inodesStr)

getContentletData

public java.util.Map<java.lang.String,java.lang.Object> getContentletData(java.lang.String inode)

searchContentlet

public java.util.List searchContentlet(java.lang.String structureInode,
                                       java.util.List<java.lang.String> fields,
                                       java.util.List<java.lang.String> categories,
                                       boolean showDeleted,
                                       boolean filterSystemHost,
                                       int page,
                                       int perPage,
                                       java.lang.String orderBy)
                                throws DotStateException,
                                       DotDataException,
                                       DotSecurityException
This method is used by the backend to pull the content from the lucene index and also checks the user permissions to see the content

Parameters:
structureInode - Inode of the structure content to be listed
fields - Fields to filters, where the position i (where i is odd) represent the field name and the position i + 1 represent the field value to filter
categories - The categories inodes to filter
showDeleted - If true show the deleted elements only
filterSystemHost - If true filter elements of system host
page - The page number to show (starting with 1) If page is 0, this will return all possible contentlets
perPage -
orderBy - The field name to be used to sort the content
Returns:
The list of contents that match the parameters at the position 0 the result included a hashmap with some useful information like the total number of results, ...
Throws:
DotSecurityException
DotDataException
DotStateException

searchContentlets

public java.util.List searchContentlets(java.lang.String structureInode,
                                        java.util.List<java.lang.String> fields,
                                        java.util.List<java.lang.String> categories,
                                        boolean showDeleted,
                                        boolean filterSystemHost,
                                        int page,
                                        java.lang.String orderBy,
                                        java.lang.String modDateFrom,
                                        java.lang.String modDateTo)
                                 throws DotStateException,
                                        DotDataException,
                                        DotSecurityException
Throws:
DotStateException
DotDataException
DotSecurityException

searchContentlets

public java.util.List searchContentlets(java.lang.String structureInode,
                                        java.util.List<java.lang.String> fields,
                                        java.util.List<java.lang.String> categories,
                                        boolean showDeleted,
                                        boolean filterSystemHost,
                                        int page,
                                        java.lang.String orderBy,
                                        java.lang.String modDateFrom,
                                        java.lang.String modDateTo,
                                        boolean saveLastSearch)
                                 throws DotStateException,
                                        DotDataException,
                                        DotSecurityException
Throws:
DotStateException
DotDataException
DotSecurityException

searchContentlets

public java.util.List searchContentlets(java.lang.String structureInode,
                                        java.util.List<java.lang.String> fields,
                                        java.util.List<java.lang.String> categories,
                                        boolean showDeleted,
                                        boolean filterSystemHost,
                                        boolean filterUnpublish,
                                        boolean filterLocked,
                                        int page,
                                        java.lang.String orderBy,
                                        java.lang.String modDateFrom,
                                        java.lang.String modDateTo)
                                 throws DotStateException,
                                        DotDataException,
                                        DotSecurityException
Throws:
DotStateException
DotDataException
DotSecurityException

searchContentlets

public java.util.List searchContentlets(java.lang.String structureInode,
                                        java.util.List<java.lang.String> fields,
                                        java.util.List<java.lang.String> categories,
                                        boolean showDeleted,
                                        boolean filterSystemHost,
                                        boolean filterUnpublish,
                                        boolean filterLocked,
                                        int page,
                                        int perPage,
                                        java.lang.String orderBy,
                                        java.lang.String modDateFrom,
                                        java.lang.String modDateTo)
                                 throws DotStateException,
                                        DotDataException,
                                        DotSecurityException
Throws:
DotStateException
DotDataException
DotSecurityException

searchFormWidget

public java.util.Map<java.lang.String,java.lang.Object> searchFormWidget(java.lang.String formStructureInode)
                                                                  throws DotDataException,
                                                                         DotSecurityException,
                                                                         org.apache.lucene.queryParser.ParseException
This method is used by the backend to pull from lucene index the form widgets if the widget doesn't exist then is created and also checks the user permissions to see the content

Parameters:
structureInode - Inode of the structure content to be listed
fields - Fields to filters, where the position i (where i is odd) represent the field name and the position i + 1 represent the field value to filter
categories - The categories inodes to filter
showDeleted - If true show the deleted elements only
page - The page number to show (starting with 1) If page is 0, this will return all possible contentlets
perPage -
orderBy - The field name to be used to sort the content
Returns:
The list of contents that match the parameters at the position 0 the result included a hashmap with some useful information like the total number of results, ...
Throws:
DotDataException
DotSecurityException
DotDataException
org.apache.lucene.queryParser.ParseException
DotSecurityException
java.lang.IllegalArgumentException
DotContentletStateException
DotContentletValidationException
org.apache.lucene.queryParser.ParseException

searchContentletsByUser

public java.util.List searchContentletsByUser(java.lang.String structureInode,
                                              java.util.List<java.lang.String> fields,
                                              java.util.List<java.lang.String> categories,
                                              boolean showDeleted,
                                              boolean filterSystemHost,
                                              boolean filterUnpublish,
                                              boolean filterLocked,
                                              int page,
                                              java.lang.String orderBy,
                                              int perPage,
                                              com.liferay.portal.model.User currentUser,
                                              javax.servlet.http.HttpSession sess,
                                              java.lang.String modDateFrom,
                                              java.lang.String modDateTo)
                                       throws DotStateException,
                                              DotDataException,
                                              DotSecurityException
This method is used by the backend to pull the content from the lucene index and also checks the user permissions to see the content

Parameters:
structureInode - Inode of the structure content to be listed
fields - Fields to filters, where the position i (where i is odd) represent the field name and the position i + 1 represent the field value to filter
categories - The categories inodes to filter
showDeleted - If true show the deleted elements only
filterSystemHost - If true filter elements of system host
page - The page number to show (starting with 1) If page is 0, this will return all posible contentlets
perPage - Number of contents to display per page
orderBy - The field name to be used to sort the content
currentUser - The user needed to check the permissions
sess - HttpSession to save some values if is set
Returns:
The list of contents that match the parameters at the position 0 the result included a hashmap with some useful information like the total number of results, ...
Throws:
DotSecurityException
DotDataException
DotStateException

doSearchGlossaryTerm

public java.util.ArrayList<java.lang.String[]> doSearchGlossaryTerm(java.lang.String valueToComplete,
                                                                    java.lang.String language)
                                                             throws java.lang.Exception
Throws:
java.lang.Exception

publishContentlets

public java.util.List<java.util.Map<java.lang.String,java.lang.Object>> publishContentlets(java.util.List<java.lang.String> identifiersList,
                                                                                           boolean isPublish,
                                                                                           long languageId)
Publishes or unpublishes contentlets from a given list of identifiers. You can have to publish within a specific language or all languages. Set the languageId = 0 for all languages.

Parameters:
identifiersList -
isPublish - whether it should publish or unpublish the contentlets
languageId - if set to 0 will publish for all languages
Returns:

saveContent

public java.util.Map<java.lang.String,java.lang.Object> saveContent(java.util.List<java.lang.String> formData,
                                                                    boolean isAutoSave,
                                                                    boolean isCheckin,
                                                                    boolean publish)
                                                             throws com.liferay.portal.language.LanguageException,
                                                                    com.liferay.portal.PortalException,
                                                                    com.liferay.portal.SystemException
Parameters:
-
-
-
Returns:
Throws:
com.liferay.portal.SystemException
com.liferay.portal.PortalException
com.liferay.portal.language.LanguageException

cancelContentEdit

public java.lang.String cancelContentEdit(java.lang.String workingContentletInode,
                                          java.lang.String currentContentletInode,
                                          java.lang.String referer,
                                          java.lang.String language)

saveContentProperties

public java.util.Map<java.lang.String,java.lang.Object> saveContentProperties(java.lang.String inode,
                                                                              java.util.List<java.lang.String> formData,
                                                                              boolean isAutoSave,
                                                                              boolean isCheckin,
                                                                              boolean isPublish)
                                                                       throws com.liferay.portal.PortalException,
                                                                              com.liferay.portal.SystemException,
                                                                              DotDataException,
                                                                              DotSecurityException
Throws:
com.liferay.portal.PortalException
com.liferay.portal.SystemException
DotDataException
DotSecurityException

removeSiblingBinaryFromSession

public void removeSiblingBinaryFromSession(java.lang.String fieldContentlet)

unrelateContent

public java.lang.String unrelateContent(java.lang.String contentletIdentifier,
                                        java.lang.String identifierToUnrelate,
                                        java.lang.String relationshipInode)

lockContent

public java.util.Map<java.lang.String,java.lang.String> lockContent(java.lang.String contentletInode)
                                                             throws DotContentletStateException,
                                                                    DotDataException,
                                                                    DotSecurityException,
                                                                    com.liferay.portal.language.LanguageException
Throws:
DotContentletStateException
DotDataException
DotSecurityException
com.liferay.portal.language.LanguageException

unlockContent

public java.util.Map<java.lang.String,java.lang.String> unlockContent(java.lang.String contentletInode)
                                                               throws DotContentletStateException,
                                                                      DotDataException,
                                                                      DotSecurityException,
                                                                      com.liferay.portal.language.LanguageException
Throws:
DotContentletStateException
DotDataException
DotSecurityException
com.liferay.portal.language.LanguageException


Copyright © 2013 dotCMS Inc. All Rights Reserved.