com.dotmarketing.portlets.contentlet.business
Interface ContentletAPIPreHook

All Known Implementing Classes:
ContentletAPIPreHookAbstractImp

public interface ContentletAPIPreHook

Since:
1.6.5c This interface should be used as a pre hook for the contentletAPI. If the hooks return false then the method will throw an exception up the stack. Stopping the progress. When possible you should always return true and let the methods go about their business.
Author:
Jason Tesser

Method Summary
 boolean addFileToContentlet(Contentlet contentlet, java.lang.String fileInode, java.lang.String relationName, com.liferay.portal.model.User user, boolean respectFrontendRoles)
          Adds a relationship to a contentlet
 boolean addImageToContentlet(Contentlet contentlet, java.lang.String imageInode, java.lang.String relationName, com.liferay.portal.model.User user, boolean respectFrontendRoles)
          Adds a relationship to a contentlet
 boolean addLinkToContentlet(Contentlet contentlet, java.lang.String linkInode, java.lang.String relationName, com.liferay.portal.model.User user, boolean respectFrontendRoles)
          Adds a relationship to a contentlet
 boolean applyStructurePermissionsToChildren(Structure structure, com.liferay.portal.model.User user, java.util.List<Permission> permissions, boolean respectFrontendRoles)
          Applies permission to the child contentlets of the structure
 boolean archive(Contentlet contentlet, com.liferay.portal.model.User user, boolean respectFrontendRoles)
          This method archives the given contentlet
 boolean archive(java.util.List<Contentlet> contentlets, com.liferay.portal.model.User user, boolean respectFrontendRoles)
          This method archives the given contentlets
 boolean canLock(Contentlet contentlet, com.liferay.portal.model.User user)
           
 boolean checkin(Contentlet currentContentlet, ContentletRelationships relationshipsData, java.util.List<Category> cats, java.util.List<Permission> selectedPermissions, com.liferay.portal.model.User user, boolean respectFrontendRoles)
          Will check in a new version of you contentlet.
 boolean checkin(Contentlet contentlet, java.util.List<Category> cats, java.util.List<Permission> permissions, com.liferay.portal.model.User user, boolean respectFrontendRoles)
          Will check in a new version of you contentlet.
 boolean checkin(Contentlet contentlet, java.util.List<Permission> permissions, com.liferay.portal.model.User user, boolean respectFrontendRoles)
          Will check in a new version of you contentlet.
 boolean checkin(Contentlet contentlet, java.util.Map<Relationship,java.util.List<Contentlet>> contentRelationships, java.util.List<Category> cats, java.util.List<Permission> permissions, com.liferay.portal.model.User user, boolean respectFrontendRoles)
          Will check in a new version of you contentlet.
 boolean checkin(Contentlet contentlet, java.util.Map<Relationship,java.util.List<Contentlet>> contentRelationships, java.util.List<Category> cats, com.liferay.portal.model.User user, boolean respectFrontendRoles)
          Will check in a new version of you contentlet.
 boolean checkin(Contentlet contentlet, java.util.Map<Relationship,java.util.List<Contentlet>> contentRelationships, com.liferay.portal.model.User user, boolean respectFrontendRoles)
          Will check in a new version of you contentlet.
 boolean checkin(Contentlet contentlet, com.liferay.portal.model.User user, boolean respectFrontendRoles)
          Will check in a new version of you contentlet.
 boolean checkin(Contentlet contentlet, com.liferay.portal.model.User user, boolean respectFrontendRoles, java.util.List<Category> cats)
          Will check in a new version of you contentlet.
 boolean checkinWithNoIndex(Contentlet currentContentlet, ContentletRelationships relationshipsData, java.util.List<Category> cats, java.util.List<Permission> selectedPermissions, com.liferay.portal.model.User user, boolean respectFrontendRoles)
          Will check in a new version of you contentlet without indexing.
 boolean checkinWithNoIndex(Contentlet contentlet, java.util.List<Category> cats, java.util.List<Permission> permissions, com.liferay.portal.model.User user, boolean respectFrontendRoles)
          Will check in a new version of you contentlet without indexing.
 boolean checkinWithNoIndex(Contentlet contentlet, java.util.List<Permission> permissions, com.liferay.portal.model.User user, boolean respectFrontendRoles)
          Will check in a new version of you contentlet without indexing.
 boolean checkinWithNoIndex(Contentlet contentlet, java.util.Map<Relationship,java.util.List<Contentlet>> contentRelationships, java.util.List<Category> cats, java.util.List<Permission> permissions, com.liferay.portal.model.User user, boolean respectFrontendRoles)
           
 boolean checkinWithNoIndex(Contentlet contentlet, java.util.Map<Relationship,java.util.List<Contentlet>> contentRelationships, java.util.List<Category> cats, com.liferay.portal.model.User user, boolean respectFrontendRoles)
          Will check in a new version of you contentlet without indexing.
 boolean checkinWithNoIndex(Contentlet contentlet, java.util.Map<Relationship,java.util.List<Contentlet>> contentRelationships, com.liferay.portal.model.User user, boolean respectFrontendRoles)
          Will check in a new version of you contentlet without indexing The inode of your contentlet must be not set.
 boolean checkinWithNoIndex(Contentlet contentlet, com.liferay.portal.model.User user, boolean respectFrontendRoles)
          Will check in a new version of you contentlet without indexing.
 boolean checkinWithNoIndex(Contentlet contentlet, com.liferay.portal.model.User user, boolean respectFrontendRoles, java.util.List<Category> cats)
          Will check in a new version of you contentlet without indexing.
 boolean checkinWithoutVersioning(Contentlet contentlet, java.util.Map<Relationship,java.util.List<Contentlet>> contentRelationships, java.util.List<Category> cats, java.util.List<Permission> permissions, com.liferay.portal.model.User user, boolean respectFrontendRoles)
          Will check in a update of your contentlet without generate a new version.
 boolean checkout(java.util.List<Contentlet> contentlets, com.liferay.portal.model.User user, boolean respectFrontendRoles)
          Allows you to checkout contents so it can be altered and checked in
 boolean checkout(java.lang.String contentletInode, com.liferay.portal.model.User user, boolean respectFrontendRoles)
          Allows you to checkout a content so it can be altered and checked in
 boolean checkout(java.lang.String luceneQuery, com.liferay.portal.model.User user, boolean respectFrontendRoles, int offset, int limit)
          Allows you to checkout contents based on a lucene query so it can be altered and checked in, in a paginated fashion
 boolean checkoutWithQuery(java.lang.String luceneQuery, com.liferay.portal.model.User user, boolean respectFrontendRoles)
          Allows you to checkout contents based on a lucene query so it can be altered and checked in
 boolean cleanField(Structure structure, Field field, com.liferay.portal.model.User user, boolean respectFrontendRoles)
          Will get all the contentlets for a structure and set the default values for a field on the contentlet.
 boolean cleanHostField(Structure structure, com.liferay.portal.model.User user, boolean respectFrontendRoles)
          Will get all the contentlets for a structure and set the default values for the host fields Will check Write/Edit permissions on the Contentlet.
 boolean contentletCount()
          gets the number of contentlets in the system.
 boolean contentletIdentifierCount()
          gets the number of contentlet identifiers in the system.
 boolean convertContentletToFatContentlet(Contentlet cont, Contentlet fatty)
          Converts a "light" contentlet into a "fat" (legacy) contentlet.
 boolean convertFatContentletToContentlet(Contentlet fatty)
          Converts a "fat" (legacy) contentlet into a new contentlet.
 boolean copyContentlet(Contentlet currentContentlet, Folder folder, com.liferay.portal.model.User user, boolean respectFrontendRoles)
          Makes a copy of a contentlet.
 boolean copyContentlet(Contentlet currentContentlet, Folder folder, com.liferay.portal.model.User user, boolean appendCopyToFileName, boolean respectFrontendRoles)
          Makes a copy of a contentlet with choice to append copy to the filename.
 boolean copyContentlet(Contentlet currentContentlet, Host host, com.liferay.portal.model.User user, boolean respectFrontendRoles)
          Makes a copy of a contentlet.
 boolean copyContentlet(Contentlet currentContentlet, com.liferay.portal.model.User user, boolean respectFrontendRoles)
          Makes a copy of a contentlet.
 boolean copyProperties(Contentlet contentlet, java.util.Map<java.lang.String,java.lang.Object> properties)
          Copies properties from the map to the contentlet
 boolean DBSearch(GenericQueryFactory.Query query, com.liferay.portal.model.User user, boolean respectFrontendRoles)
           
 boolean delete(Contentlet contentlet, com.liferay.portal.model.User user, boolean respectFrontendRoles)
          This method completely deletes the given contentlet from the system
 boolean delete(Contentlet contentlet, com.liferay.portal.model.User user, boolean respectFrontendRoles, boolean allVersions)
          This method completely deletes the given contentlet from the system.
 boolean delete(java.util.List<Contentlet> contentlets, com.liferay.portal.model.User user, boolean respectFrontendRoles)
          This method completely deletes the given contentlet from the system
 boolean delete(java.util.List<Contentlet> contentlets, com.liferay.portal.model.User user, boolean respectFrontendRoles, boolean allVersions)
          This method completely deletes the given contentlet from the system.
 boolean deleteOldContent(java.util.Date deleteFrom)
           
 boolean deleteRelatedContent(Contentlet contentlet, Relationship relationship, boolean hasParent, com.liferay.portal.model.User user, boolean respectFrontendRoles)
          Deletes all related content from passed in contentlet and relationship
 boolean deleteRelatedContent(Contentlet contentlet, Relationship relationship, com.liferay.portal.model.User user, boolean respectFrontendRoles)
          Deletes all related content from passed in contentlet and relationship
 boolean deleteVersion(Contentlet contentlet, com.liferay.portal.model.User user, boolean respectFrontendRoles)
          Deletes the given version of the contentlet from the system
 boolean find(Category category, long languageId, boolean live, java.lang.String orderBy, com.liferay.portal.model.User user, boolean respectFrontendRoles)
          Will return all content assigned to a specified Category
 boolean find(java.util.List<Category> categories, long languageId, boolean live, java.lang.String orderBy, com.liferay.portal.model.User user, boolean respectFrontendRoles)
          Will return all content assigned to a specified Categories
 boolean find(java.lang.String inode, com.liferay.portal.model.User user, boolean respectFrontendRoles)
          Finds a Contentlet Object given the inode
 boolean findAllContent(int offset, int limit)
           
 boolean findAllUserVersions(Identifier identifier, com.liferay.portal.model.User user, boolean respectFrontendRoles)
          Retrieves all versions for a contentlet identifier checked in by a real user meaning not the system user
 boolean findAllVersions(Identifier identifier, com.liferay.portal.model.User user, boolean respectFrontendRoles)
          Retrieves all versions for a contentlet identifier Note this method should not be used currently because it could pull too many versions.
 boolean findByStructure(java.lang.String structureInode, com.liferay.portal.model.User user, boolean respectFrontendRoles, int limit, int offset)
          Returns all Contentlets for a specific structure
 boolean findByStructure(Structure structure, com.liferay.portal.model.User user, boolean respectFrontendRoles, int limit, int offset)
          Returns all Contentlets for a specific structure
 boolean findContentletByIdentifier(java.lang.String identifier, boolean live, long languageId, com.liferay.portal.model.User user, boolean respectFrontendRoles)
          Retrieves a contentlet from the database based on its identifier
 boolean findContentletForLanguage(long languageId, Identifier contentletId)
          Returns a live Contentlet Object for a given language
 boolean findContentlets(java.util.List<java.lang.String> inodes)
          Gets a list of Contentlets from a passed in list of inodes.
 boolean findContentletsByFolder(Folder parentFolder, com.liferay.portal.model.User user, boolean respectFrontendRoles)
          Gets a list of Contentlets from a given parent folder
 boolean findContentletsByHost(Host parentHost, com.liferay.portal.model.User user, boolean respectFrontendRoles)
          Gets a list of Contentlets from a given parent host
 boolean findContentletsByIdentifiers(java.lang.String[] identifiers, boolean live, long languageId, com.liferay.portal.model.User user, boolean respectFrontendRoles)
          Retrieves a contentlet list from the database based on a identifiers array
 boolean findContentRelationships(Contentlet contentlet, com.liferay.portal.model.User user)
          Returns the ContentRelationships Map for the specified content.
 boolean findFieldValues(java.lang.String structureInode, Field field, com.liferay.portal.model.User user, boolean respectFrontEndRoles)
           
 boolean findPageContentlets(java.lang.String HTMLPageIdentifier, java.lang.String containerIdentifier, java.lang.String orderby, boolean working, long languageId, com.liferay.portal.model.User user, boolean respectFrontendRoles)
          Returns the contentlets on a given page.
 boolean getAllLanguages(Contentlet contentlet, java.lang.Boolean isLiveContent, com.liferay.portal.model.User user, boolean respectFrontendRoles)
          Returns a contentlet's siblings for a given contentlet object.
 boolean getAllRelationships(Contentlet contentlet)
          Returns all contentlet's relationships for a given contentlet object
 boolean getAllRelationships(java.lang.String contentletInode, com.liferay.portal.model.User user, boolean respectFrontendRoles)
          Returns all contentlet's relationships for a given contentlet inode
 boolean getBinaryFile(java.lang.String contentletInode, java.lang.String velocityVariableName, com.liferay.portal.model.User user)
          Fetches the File Name stored under the contentlet and field
 boolean getContentletReferences(Contentlet contentlet, com.liferay.portal.model.User user, boolean respectFrontendRoles)
          Retrieves all references for a Contentlet.
 boolean getFieldValue(Contentlet contentlet, Field theField)
          Gets the value of a field with a given contentlet
 boolean getMostViewedContent(java.lang.String structureVariableName, java.lang.String startDate, java.lang.String endDate, com.liferay.portal.model.User user)
          Gets the top viewed content for a particular structure for a specified date interval
 boolean getName(Contentlet contentlet, com.liferay.portal.model.User user, boolean respectFrontendRoles)
          Meant to get the title or name of a contentlet
 boolean getNextReview(Contentlet content, com.liferay.portal.model.User user, boolean respectFrontendRoles)
          Finds the next date that a contentlet must be reviewed
 boolean getReferencingContentlet(File file, boolean live, com.liferay.portal.model.User user, boolean respectFrontendRoles)
          Gets all contents referenced by a given file asset
 boolean getRelatedContent(Contentlet contentlet, Relationship rel, boolean pullByParent, com.liferay.portal.model.User user, boolean respectFrontendRoles)
          Gets all related content from a same structures (where the parent and child structures are the same type) The parameter pullByParent if set to true tells the method to pull all children where the passed contentlet is the parent, if set to false then the passed contentlet is the child and you want to pull parents If this method is invoked for a no same structures kind of relationships then the parameter pullByParent will be ignored, and the side of the relationship will be figured out automatically
 boolean getRelatedContent(Contentlet contentlet, Relationship rel, com.liferay.portal.model.User user, boolean respectFrontendRoles)
          Gets all related content, if this method is invoked with a same structures (where the parent and child structures are the same type) kind of relationship then all parents and children of the given contentlet will be retrieved in the same returned list
 boolean getRelatedFiles(Contentlet contentlet, com.liferay.portal.model.User user, boolean respectFrontendRoles)
          Get all the files relates to the contentlet
 boolean getRelatedIdentifier(Contentlet contentlet, java.lang.String relationshipType, com.liferay.portal.model.User user, boolean respectFrontendRoles)
          Gets a file with a specific relationship type to the passed in contentlet
 boolean getRelatedLinks(Contentlet contentlet, com.liferay.portal.model.User user, boolean respectFrontendRoles)
          Gets all related links to the contentlet
 boolean getSiblings(java.lang.String identifier)
           
 boolean getUrlMapForContentlet(Contentlet contentlet, com.liferay.portal.model.User user, boolean respectFrontendRoles)
          Return the URL Map for the specified content if the structure associated to the content has the URL Map Pattern set.
 boolean indexCount(java.lang.String luceneQuery, com.liferay.portal.model.User user, boolean respectFrontendRoles)
           
 boolean isContentEqual(Contentlet contentlet1, Contentlet contentlet2, com.liferay.portal.model.User user, boolean respectFrontendRoles)
           
 boolean isContentlet(java.lang.String inode)
          Use to check if the inode id is a contentlet
 boolean isFieldTypeBoolean(Field field)
          Use to determine if if the field value is a Boolean value withing the contentlet object
 boolean isFieldTypeDate(Field field)
          Use to determine if if the field value is a Date value withing the contentlet object
 boolean isFieldTypeFloat(Field field)
          Use to determine if if the field value is a Float value withing the contentlet object
 boolean isFieldTypeLong(Field field)
          Use to determine if if the field value is a Long value withing the contentlet object
 boolean isFieldTypeString(Field field)
          Use to determine if if the field value is a String value withing the contentlet object
 boolean isInodeIndexed(java.lang.String inode)
          Method will time out after 30 seconds returning false
 boolean isInodeIndexed(java.lang.String inode, boolean live)
           
 boolean isInodeIndexed(java.lang.String inode, int secondsToWait)
          Method will time out after 30 seconds returning false
 boolean loadField(java.lang.String inode, Field field)
           
 boolean lock(Contentlet contentlet, com.liferay.portal.model.User user, boolean respectFrontendRoles)
          Use to lock a contentlet
 boolean publish(Contentlet contentlet, com.liferay.portal.model.User user, boolean respectFrontendRoles)
          Publishes a piece of content.
 boolean publish(java.util.List<Contentlet> contentlets, com.liferay.portal.model.User user, boolean respectFrontendRoles)
          Publishes a piece of content.
 boolean publishRelatedHtmlPages(Contentlet contentlet)
          Publishes all related HTMLPage
 boolean refresh(Contentlet content)
           
 boolean refresh(Structure structure)
           
 boolean refreshAllContent()
           
 boolean refreshContentUnderFolder(Folder folder)
          Reindexes content under a given folder + refreshes the content from cache
 boolean refreshContentUnderHost(Host host)
          Reindexes content under a given host + refreshes the content from cache
 boolean refreshReferencingContentlets(File file, boolean live)
          Refreshes (regenerates) all content files referenced by a given file asset
 boolean reindex()
          Reindex all content
 boolean reindex(Contentlet contentlet)
          reindex a single content
 boolean reindex(Structure structure)
          reindex content for a given structure
 boolean reIndexForServerNode()
          Used to reindex content for the specific server the code executes on at runtime in a cluster
 boolean relateContent(Contentlet contentlet, ContentletRelationships.ContentletRelationshipRecords related, com.liferay.portal.model.User user, boolean respectFrontendRoles)
          Associates the given list of contentlets using the relationship this methods removes old associated content and reset the relatioships based on the list of content passed as parameter
 boolean relateContent(Contentlet contentlet, Relationship rel, java.util.List<Contentlet> related, com.liferay.portal.model.User user, boolean respectFrontendRoles)
          Associates the given list of contentlets using the relationship this methods removes old associated content and reset the relatioships based on the list of content passed as parameter
 boolean removeContentletFromIndex(java.lang.String contentletInodeOrIdentifier)
           
 boolean removeFolderReferences(Folder folder)
          Will update contents that reference the given folder to point to it's parent folder, if it's a top folder it will set folder to be SYSTEM_FOLDER
 boolean removeUserReferences(java.lang.String userId)
          Method will remove User References of the given userId in Contentlet
 boolean restoreVersion(Contentlet contentlet, com.liferay.portal.model.User user, boolean respectFrontendRoles)
          Will make the passed in contentlet the working copy.
 boolean saveDraft(Contentlet contentlet, java.util.Map<Relationship,java.util.List<Contentlet>> contentRelationships, java.util.List<Category> cats, java.util.List<Permission> permissions, com.liferay.portal.model.User user, boolean respectFrontendRoles)
          Checks if the version you are saving is live=false.
 boolean search(java.lang.String luceneQuery, int limit, int offset, java.lang.String sortBy, com.liferay.portal.model.User user, boolean respectFrontendRoles)
          The search here takes a lucene query and pulls Contentlets for you.
 boolean search(java.lang.String luceneQuery, int limit, int offset, java.lang.String sortBy, com.liferay.portal.model.User user, boolean respectFrontendRoles, int requiredPermission)
          The search here takes a lucene query and pulls Contentlets for you.
 boolean searchByIdentifier(java.lang.String luceneQuery, int limit, int offset, java.lang.String sortBy, com.liferay.portal.model.User user, boolean respectFrontendRoles)
          The search here takes a lucene query and pulls Contentlets for you, using the identifier of the contentlet.You can pass sortBy as null if you do not have a field to sort by.
 boolean searchByIdentifier(java.lang.String luceneQuery, int limit, int offset, java.lang.String sortBy, com.liferay.portal.model.User user, boolean respectFrontendRoles, int requiredPermission)
          The search here takes a lucene query and pulls Contentlets for you, using the identifier of the contentlet.You can pass sortBy as null if you do not have a field to sort by.
 boolean searchByIdentifier(java.lang.String luceneQuery, int limit, int offset, java.lang.String sortBy, com.liferay.portal.model.User user, boolean respectFrontendRoles, int requiredPermission, boolean anyLanguage)
          The search here takes a lucene query and pulls Contentlets for you, using the identifier of the contentlet.You can pass sortBy as null if you do not have a field to sort by.
 boolean searchIndex(java.lang.String luceneQuery, int limit, int offset, java.lang.String sortBy, com.liferay.portal.model.User user, boolean respectFrontendRoles)
          The search here takes a lucene query and pulls LuceneHits for you.
 boolean searchIndexCount(java.lang.String luceneQuery, com.liferay.portal.model.User user, boolean respectFrontendRoles)
           
 boolean setContentletProperty(Contentlet contentlet, Field field, java.lang.Object value)
          Use to set contentlet properties.
 boolean unarchive(Contentlet contentlet, com.liferay.portal.model.User user, boolean respectFrontendRoles)
          This method unarchives the given contentlet
 boolean unarchive(java.util.List<Contentlet> contentlets, com.liferay.portal.model.User user, boolean respectFrontendRoles)
          This method unarchives the given contentlets
 boolean unlock(Contentlet contentlet, com.liferay.portal.model.User user, boolean respectFrontendRoles)
           
 boolean unpublish(Contentlet contentlet, com.liferay.portal.model.User user, boolean respectFrontendRoles)
          This method unpublishes the given contentlet
 boolean unpublish(java.util.List<Contentlet> contentlets, com.liferay.portal.model.User user, boolean respectFrontendRoles)
          This method unpublishes the given contentlet
 boolean UpdateContentWithSystemHost(java.lang.String hostIdentifier)
          Method will update hostInode of content to systemhost
 boolean validateContentlet(Contentlet contentlet, ContentletRelationships contentRelationships, java.util.List<Category> cats)
          Use to validate your contentlet.
 boolean validateContentlet(Contentlet contentlet, java.util.List<Category> cats)
          Use to validate your contentlet.
 boolean validateContentlet(Contentlet contentlet, java.util.Map<Relationship,java.util.List<Contentlet>> contentRelationships, java.util.List<Category> cats)
          Use to validate your contentlet.
 

Method Detail

findAllContent

boolean findAllContent(int offset,
                       int limit)
Parameters:
offset - can be 0 if no offset
limit - can be 0 of no limit
Returns:
false if the hook should stop the transaction

find

boolean find(java.lang.String inode,
             com.liferay.portal.model.User user,
             boolean respectFrontendRoles)
Finds a Contentlet Object given the inode

Parameters:
inode -
Returns:
false if the hook should stop the transaction

findContentletForLanguage

boolean findContentletForLanguage(long languageId,
                                  Identifier contentletId)
Returns a live Contentlet Object for a given language

Parameters:
languageId -
inode -
Returns:

findByStructure

boolean findByStructure(Structure structure,
                        com.liferay.portal.model.User user,
                        boolean respectFrontendRoles,
                        int limit,
                        int offset)
Returns all Contentlets for a specific structure

Parameters:
structure -
user -
respectFrontendRoles -
limit -
offset -
Returns:
Throws:
DotDataException
DotSecurityException

findByStructure

boolean findByStructure(java.lang.String structureInode,
                        com.liferay.portal.model.User user,
                        boolean respectFrontendRoles,
                        int limit,
                        int offset)
Returns all Contentlets for a specific structure

Parameters:
structureInode -
user -
respectFrontendRoles -
limit -
offset -
Returns:

findContentletByIdentifier

boolean findContentletByIdentifier(java.lang.String identifier,
                                   boolean live,
                                   long languageId,
                                   com.liferay.portal.model.User user,
                                   boolean respectFrontendRoles)
Retrieves a contentlet from the database based on its identifier

Parameters:
identifier -
live - Retrieves the live version if false retrieves the working version
Returns:

findContentletsByIdentifiers

boolean findContentletsByIdentifiers(java.lang.String[] identifiers,
                                     boolean live,
                                     long languageId,
                                     com.liferay.portal.model.User user,
                                     boolean respectFrontendRoles)
Retrieves a contentlet list from the database based on a identifiers array

Parameters:
identifiers - Array of identifiers
live - Retrieves the live version if false retrieves the working version
languageId -
user -
respectFrontendRoles -
Returns:

findContentlets

boolean findContentlets(java.util.List<java.lang.String> inodes)
                        throws DotDataException
Gets a list of Contentlets from a passed in list of inodes.

Parameters:
inodes -
Returns:
Throws:
DotDataException

findContentletsByFolder

boolean findContentletsByFolder(Folder parentFolder,
                                com.liferay.portal.model.User user,
                                boolean respectFrontendRoles)
Gets a list of Contentlets from a given parent folder

Parameters:
parentFolder -
Returns:

findContentletsByHost

boolean findContentletsByHost(Host parentHost,
                              com.liferay.portal.model.User user,
                              boolean respectFrontendRoles)
Gets a list of Contentlets from a given parent host

Parameters:
parentHost -
Returns:

copyContentlet

boolean copyContentlet(Contentlet currentContentlet,
                       com.liferay.portal.model.User user,
                       boolean respectFrontendRoles)
Makes a copy of a contentlet.

Parameters:
currentContentlet -
Returns:

copyContentlet

boolean copyContentlet(Contentlet currentContentlet,
                       Host host,
                       com.liferay.portal.model.User user,
                       boolean respectFrontendRoles)
Makes a copy of a contentlet.

Parameters:
currentContentlet -
Returns:

copyContentlet

boolean copyContentlet(Contentlet currentContentlet,
                       Folder folder,
                       com.liferay.portal.model.User user,
                       boolean respectFrontendRoles)
Makes a copy of a contentlet.

Parameters:
currentContentlet -
Returns:

copyContentlet

boolean copyContentlet(Contentlet currentContentlet,
                       Folder folder,
                       com.liferay.portal.model.User user,
                       boolean appendCopyToFileName,
                       boolean respectFrontendRoles)
Makes a copy of a contentlet with choice to append copy to the filename.

Parameters:
currentContentlet -
Returns:

search

boolean search(java.lang.String luceneQuery,
               int limit,
               int offset,
               java.lang.String sortBy,
               com.liferay.portal.model.User user,
               boolean respectFrontendRoles)
The search here takes a lucene query and pulls Contentlets for you. You can pass sortBy as null if you do not have a field to sort by. limit should be 0 if no limit and the offset should be -1 is you are not paginating. The returned list will be filtered with only the contentlets that the user can read(use). you can of course also pass permissions to further limit in the lucene query itself

Parameters:
luceneQuery -
limit -
offset -
sortBy -
user -
respectFrontendRoles -
Returns:

search

boolean search(java.lang.String luceneQuery,
               int limit,
               int offset,
               java.lang.String sortBy,
               com.liferay.portal.model.User user,
               boolean respectFrontendRoles,
               int requiredPermission)
The search here takes a lucene query and pulls Contentlets for you. You can pass sortBy as null if you do not have a field to sort by. limit should be 0 if no limit and the offset should be -1 is you are not paginating. The returned list will be filtered with only the contentlets that match the required permission. You can of course also pass permissions to further limit in the lucene query itself

Parameters:
luceneQuery -
limit -
offset -
sortBy - indexName(previously known as dbColumnName) to order by. Can be null or empty string
user -
respectFrontendRoles -
requiredPermission -
Returns:

searchIndex

boolean searchIndex(java.lang.String luceneQuery,
                    int limit,
                    int offset,
                    java.lang.String sortBy,
                    com.liferay.portal.model.User user,
                    boolean respectFrontendRoles)
The search here takes a lucene query and pulls LuceneHits for you. You can pass sortBy as null if you do not have a field to sort by. limit should be 0 if no limit and the offset should be -1 is you are not paginating. The returned list will be filtered with only the contentlets that the user can read(use). you can of course also pass permissions to further limit in the lucene query itself

Parameters:
luceneQuery -
limit -
offset -
sortBy - indexName(previously known as dbColumnName) to order by. Can be null or empty string
user -
respectFrontendRoles -
Returns:

publishRelatedHtmlPages

boolean publishRelatedHtmlPages(Contentlet contentlet)
Publishes all related HTMLPage

Parameters:
contentlet -

cleanField

boolean cleanField(Structure structure,
                   Field field,
                   com.liferay.portal.model.User user,
                   boolean respectFrontendRoles)
Will get all the contentlets for a structure and set the default values for a field on the contentlet. Will check Write/Edit permissions on the Contentlet. So to guarantee all COntentlets will be cleaned make sure to pass in an Admin User. If a user doesn't have permissions to clean all teh contentlets it will clean as many as it can and throw the DotSecurityException

Parameters:
structure -
field -
user -
respectFrontendRoles -

cleanHostField

boolean cleanHostField(Structure structure,
                       com.liferay.portal.model.User user,
                       boolean respectFrontendRoles)
Will get all the contentlets for a structure and set the default values for the host fields Will check Write/Edit permissions on the Contentlet. So to guarantee all COntentlets will be cleaned make sure to pass in an Admin User. If a user doesn't have permissions to clean all teh contentlets it will clean as many as it can and throw the DotSecurityException

Parameters:
structure -
field -
user -
respectFrontendRoles -

getNextReview

boolean getNextReview(Contentlet content,
                      com.liferay.portal.model.User user,
                      boolean respectFrontendRoles)
Finds the next date that a contentlet must be reviewed

Parameters:
content -
user -
respectFrontendRoles -
Returns:

getContentletReferences

boolean getContentletReferences(Contentlet contentlet,
                                com.liferay.portal.model.User user,
                                boolean respectFrontendRoles)
Retrieves all references for a Contentlet. The result is an ArrayList of type Map whose key will be page or container with the respective object as the value.

Parameters:
contentlet -
user -
respectFrontendRoles -
Returns:

getFieldValue

boolean getFieldValue(Contentlet contentlet,
                      Field theField)
Gets the value of a field with a given contentlet

Parameters:
contentlet -
theField -
user -
respectFrontendRoles -
Returns:

addLinkToContentlet

boolean addLinkToContentlet(Contentlet contentlet,
                            java.lang.String linkInode,
                            java.lang.String relationName,
                            com.liferay.portal.model.User user,
                            boolean respectFrontendRoles)
Adds a relationship to a contentlet

Parameters:
contentlet -
linkInode -
relationName -
user -
respectFrontendRoles -

addFileToContentlet

boolean addFileToContentlet(Contentlet contentlet,
                            java.lang.String fileInode,
                            java.lang.String relationName,
                            com.liferay.portal.model.User user,
                            boolean respectFrontendRoles)
Adds a relationship to a contentlet

Parameters:
contentlet -
fileInode -
relationName -
user -
respectFrontendRoles -

addImageToContentlet

boolean addImageToContentlet(Contentlet contentlet,
                             java.lang.String imageInode,
                             java.lang.String relationName,
                             com.liferay.portal.model.User user,
                             boolean respectFrontendRoles)
Adds a relationship to a contentlet

Parameters:
contentlet -
imageInode -
relationName -
user -
respectFrontendRoles -

findPageContentlets

boolean findPageContentlets(java.lang.String HTMLPageIdentifier,
                            java.lang.String containerIdentifier,
                            java.lang.String orderby,
                            boolean working,
                            long languageId,
                            com.liferay.portal.model.User user,
                            boolean respectFrontendRoles)
Returns the contentlets on a given page. Will only return contentlets the user has permission to read/use You can pass -1 for languageId if you don't want to query to pull based on languages or 0 if you want to get the default language

Parameters:
HTMLPageIdentifier -
containerIdentifier -
orderby -
working -
languageId -
user -
respectFrontendRoles -
Returns:

getAllRelationships

boolean getAllRelationships(java.lang.String contentletInode,
                            com.liferay.portal.model.User user,
                            boolean respectFrontendRoles)
Returns all contentlet's relationships for a given contentlet inode

Parameters:
contentletInode -
Returns:
a ContentletRelationships object containing all relationships for the contentlet

getAllRelationships

boolean getAllRelationships(Contentlet contentlet)
Returns all contentlet's relationships for a given contentlet object

Parameters:
contentlet -
Returns:
a ContentletRelationships object containing all relationships for the contentlet

getAllLanguages

boolean getAllLanguages(Contentlet contentlet,
                        java.lang.Boolean isLiveContent,
                        com.liferay.portal.model.User user,
                        boolean respectFrontendRoles)
Returns a contentlet's siblings for a given contentlet object.

Parameters:
contentlet -
Returns:
a ContentletRelationships object containing all relationships for the contentlet

isContentEqual

boolean isContentEqual(Contentlet contentlet1,
                       Contentlet contentlet2,
                       com.liferay.portal.model.User user,
                       boolean respectFrontendRoles)
Parameters:
contentlet1 -
contentlet2 -
user -
respectFrontendRoles -
Returns:

archive

boolean archive(Contentlet contentlet,
                com.liferay.portal.model.User user,
                boolean respectFrontendRoles)
This method archives the given contentlet

Parameters:
contentlet -
user -
respectFrontendRoles -

delete

boolean delete(Contentlet contentlet,
               com.liferay.portal.model.User user,
               boolean respectFrontendRoles)
This method completely deletes the given contentlet from the system

Parameters:
contentlet -
user -
respectFrontendRoles -

delete

boolean delete(Contentlet contentlet,
               com.liferay.portal.model.User user,
               boolean respectFrontendRoles,
               boolean allVersions)
This method completely deletes the given contentlet from the system. It was added for the jira issue http://jira.dotmarketing.net/browse/DOTCMS-2059

Parameters:
contentlet -
user -
respectFrontendRoles -
allVersions -

publish

boolean publish(Contentlet contentlet,
                com.liferay.portal.model.User user,
                boolean respectFrontendRoles)
Publishes a piece of content.

Parameters:
contentlet -
user -
respectFrontendRoles -
Returns:

publish

boolean publish(java.util.List<Contentlet> contentlets,
                com.liferay.portal.model.User user,
                boolean respectFrontendRoles)
Publishes a piece of content.

Parameters:
contentlets -
user -
respectFrontendRoles -
Returns:

unpublish

boolean unpublish(Contentlet contentlet,
                  com.liferay.portal.model.User user,
                  boolean respectFrontendRoles)
This method unpublishes the given contentlet

Parameters:
contentlet -
user -
respectFrontendRoles -

unpublish

boolean unpublish(java.util.List<Contentlet> contentlets,
                  com.liferay.portal.model.User user,
                  boolean respectFrontendRoles)
This method unpublishes the given contentlet

Parameters:
contentlets -
user -
respectFrontendRoles -

archive

boolean archive(java.util.List<Contentlet> contentlets,
                com.liferay.portal.model.User user,
                boolean respectFrontendRoles)
This method archives the given contentlets

Parameters:
contentlets -
user -
respectFrontendRoles -

unarchive

boolean unarchive(java.util.List<Contentlet> contentlets,
                  com.liferay.portal.model.User user,
                  boolean respectFrontendRoles)
This method unarchives the given contentlets

Parameters:
contentlets -
user -
respectFrontendRoles -

unarchive

boolean unarchive(Contentlet contentlet,
                  com.liferay.portal.model.User user,
                  boolean respectFrontendRoles)
This method unarchives the given contentlet

Parameters:
contentlet -
user -
respectFrontendRoles -

delete

boolean delete(java.util.List<Contentlet> contentlets,
               com.liferay.portal.model.User user,
               boolean respectFrontendRoles)
This method completely deletes the given contentlet from the system

Parameters:
contentlets -
user -
respectFrontendRoles -

delete

boolean delete(java.util.List<Contentlet> contentlets,
               com.liferay.portal.model.User user,
               boolean respectFrontendRoles,
               boolean allVersions)
This method completely deletes the given contentlet from the system. It was added for the jira issue http://jira.dotmarketing.net/browse/DOTCMS-2059

Parameters:
contentlets -
user -
respectFrontendRoles -
allVersions -

deleteRelatedContent

boolean deleteRelatedContent(Contentlet contentlet,
                             Relationship relationship,
                             com.liferay.portal.model.User user,
                             boolean respectFrontendRoles)
Deletes all related content from passed in contentlet and relationship

Parameters:
contentlet -
relationship -
user -
respectFrontendRoles -

deleteRelatedContent

boolean deleteRelatedContent(Contentlet contentlet,
                             Relationship relationship,
                             boolean hasParent,
                             com.liferay.portal.model.User user,
                             boolean respectFrontendRoles)
Deletes all related content from passed in contentlet and relationship

Parameters:
contentlet -
relationship -
user -
respectFrontendRoles -

relateContent

boolean relateContent(Contentlet contentlet,
                      Relationship rel,
                      java.util.List<Contentlet> related,
                      com.liferay.portal.model.User user,
                      boolean respectFrontendRoles)
Associates the given list of contentlets using the relationship this methods removes old associated content and reset the relatioships based on the list of content passed as parameter

Parameters:
contentlet -
rel -
related -
user -
respectFrontendRoles -

relateContent

boolean relateContent(Contentlet contentlet,
                      ContentletRelationships.ContentletRelationshipRecords related,
                      com.liferay.portal.model.User user,
                      boolean respectFrontendRoles)
Associates the given list of contentlets using the relationship this methods removes old associated content and reset the relatioships based on the list of content passed as parameter

Parameters:
contentlet -
rel -
related -
user -
respectFrontendRoles -

getRelatedContent

boolean getRelatedContent(Contentlet contentlet,
                          Relationship rel,
                          com.liferay.portal.model.User user,
                          boolean respectFrontendRoles)
Gets all related content, if this method is invoked with a same structures (where the parent and child structures are the same type) kind of relationship then all parents and children of the given contentlet will be retrieved in the same returned list

Parameters:
contentlet -
rel -
user -
respectFrontendRoles -
Returns:

getRelatedContent

boolean getRelatedContent(Contentlet contentlet,
                          Relationship rel,
                          boolean pullByParent,
                          com.liferay.portal.model.User user,
                          boolean respectFrontendRoles)
Gets all related content from a same structures (where the parent and child structures are the same type) The parameter pullByParent if set to true tells the method to pull all children where the passed contentlet is the parent, if set to false then the passed contentlet is the child and you want to pull parents If this method is invoked for a no same structures kind of relationships then the parameter pullByParent will be ignored, and the side of the relationship will be figured out automatically

Parameters:
contentlet -
rel -
pullByParent -
user -
respectFrontendRoles -
Returns:

getReferencingContentlet

boolean getReferencingContentlet(File file,
                                 boolean live,
                                 com.liferay.portal.model.User user,
                                 boolean respectFrontendRoles)
Gets all contents referenced by a given file asset

Parameters:
file - asset.
live - contentlets or not.
user -
respectFrontendRoles -
Returns:
List of contentlets. Null if no related contentlets found.

refreshReferencingContentlets

boolean refreshReferencingContentlets(File file,
                                      boolean live)
Refreshes (regenerates) all content files referenced by a given file asset

Parameters:
file - asset
live - contentlets or not
Returns:

unlock

boolean unlock(Contentlet contentlet,
               com.liferay.portal.model.User user,
               boolean respectFrontendRoles)
Parameters:
contentlet -
user -
respectFrontendRoles -

lock

boolean lock(Contentlet contentlet,
             com.liferay.portal.model.User user,
             boolean respectFrontendRoles)
Use to lock a contentlet

Parameters:
contentlet -
user -
respectFrontendRoles -

reindex

boolean reindex()
Reindex all content


reindex

boolean reindex(Structure structure)
reindex content for a given structure

Parameters:
structure -

reindex

boolean reindex(Contentlet contentlet)
reindex a single content

Parameters:
contentlet -

reIndexForServerNode

boolean reIndexForServerNode()
Used to reindex content for the specific server the code executes on at runtime in a cluster

Throws:
DotDataException

getRelatedFiles

boolean getRelatedFiles(Contentlet contentlet,
                        com.liferay.portal.model.User user,
                        boolean respectFrontendRoles)
Get all the files relates to the contentlet

Parameters:
contentlet -
user -
respectFrontendRoles -
Returns:

getRelatedIdentifier

boolean getRelatedIdentifier(Contentlet contentlet,
                             java.lang.String relationshipType,
                             com.liferay.portal.model.User user,
                             boolean respectFrontendRoles)
Gets a file with a specific relationship type to the passed in contentlet

Parameters:
contentlet -
relationshipType -
user -
respectFrontendRoles -
Returns:

getRelatedLinks

boolean getRelatedLinks(Contentlet contentlet,
                        com.liferay.portal.model.User user,
                        boolean respectFrontendRoles)
Gets all related links to the contentlet

Parameters:
contentlet -
user -
respectFrontendRoles -
Returns:

checkout

boolean checkout(java.lang.String contentletInode,
                 com.liferay.portal.model.User user,
                 boolean respectFrontendRoles)
Allows you to checkout a content so it can be altered and checked in

Parameters:
contentletInode -
user -
respectFrontendRoles -
Returns:

checkout

boolean checkout(java.util.List<Contentlet> contentlets,
                 com.liferay.portal.model.User user,
                 boolean respectFrontendRoles)
Allows you to checkout contents so it can be altered and checked in

Parameters:
contentlets -
user -
respectFrontendRoles -
Returns:

checkoutWithQuery

boolean checkoutWithQuery(java.lang.String luceneQuery,
                          com.liferay.portal.model.User user,
                          boolean respectFrontendRoles)
Allows you to checkout contents based on a lucene query so it can be altered and checked in

Parameters:
luceneQuery -
user -
respectFrontendRoles -
Returns:
Throws:
org.apache.lucene.queryParser.ParseException

checkout

boolean checkout(java.lang.String luceneQuery,
                 com.liferay.portal.model.User user,
                 boolean respectFrontendRoles,
                 int offset,
                 int limit)
Allows you to checkout contents based on a lucene query so it can be altered and checked in, in a paginated fashion

Parameters:
luceneQuery -
user -
respectFrontendRoles -
offset -
limit -
Returns:
Throws:
org.apache.lucene.queryParser.ParseException

checkin

boolean checkin(Contentlet contentlet,
                java.util.Map<Relationship,java.util.List<Contentlet>> contentRelationships,
                java.util.List<Category> cats,
                java.util.List<Permission> permissions,
                com.liferay.portal.model.User user,
                boolean respectFrontendRoles)
Will check in a new version of you contentlet. The inode of your contentlet must be 0.

Parameters:
contentlet - - The inode of your contentlet must be 0.
contentRelationships - - throws IllegalArgumentException if null. Used to set relationships to new contentlet version
cats - - throws IllegalArgumentException if null. Used to set categories to new contentlet version
permissions - - throws IllegalArgumentException if null. Used to set permissions to new contentlet version
user -
respectFrontendRoles -

checkin

boolean checkin(Contentlet currentContentlet,
                ContentletRelationships relationshipsData,
                java.util.List<Category> cats,
                java.util.List<Permission> selectedPermissions,
                com.liferay.portal.model.User user,
                boolean respectFrontendRoles)
Will check in a new version of you contentlet. The inode of your contentlet must be 0. This version of checkin contains a more complex structure to pass the relationship in order to handle a same structures (where the parent and child structures are the same) kind of relationships in that case you have to specify if the role of the content is the parent of the child of the relatioship

Parameters:
currentContentlet - - The inode of your contentlet must be 0.
relationshipsData - -
cats -
selectedPermissions -
user -
respectFrontendRoles -
Returns:

checkin

boolean checkin(Contentlet contentlet,
                java.util.List<Category> cats,
                java.util.List<Permission> permissions,
                com.liferay.portal.model.User user,
                boolean respectFrontendRoles)
Will check in a new version of you contentlet. The inode of your contentlet must be 0.

Parameters:
contentlet - - The inode of your contentlet must be 0.
cats - - throws IllegalArgumentException if null. Used to set categories to new contentlet version
permissions - - throws IllegalArgumentException if null. Used to set permissions to new contentlet version
user -
respectFrontendRoles -

checkin

boolean checkin(Contentlet contentlet,
                java.util.List<Permission> permissions,
                com.liferay.portal.model.User user,
                boolean respectFrontendRoles)
Will check in a new version of you contentlet. The inode of your contentlet must be 0.

Parameters:
contentlet - - The inode of your contentlet must be 0.
permissions - - throws IllegalArgumentException if null. Used to set permissions to new contentlet version
user -
respectFrontendRoles -

checkin

boolean checkin(Contentlet contentlet,
                com.liferay.portal.model.User user,
                boolean respectFrontendRoles,
                java.util.List<Category> cats)
Will check in a new version of you contentlet. The inode of your contentlet must be 0.

Parameters:
contentlet - - The inode of your contentlet must be 0.
contentRelationships - - throws IllegalArgumentException if null. Used to set relationships to new contentlet version
cats - - throws IllegalArgumentException if null. Used to set categories to new contentlet version
permissions - - throws IllegalArgumentException if null. Used to set permissions to new contentlet version
user -
respectFrontendRoles -

checkin

boolean checkin(Contentlet contentlet,
                java.util.Map<Relationship,java.util.List<Contentlet>> contentRelationships,
                java.util.List<Category> cats,
                com.liferay.portal.model.User user,
                boolean respectFrontendRoles)
Will check in a new version of you contentlet. The inode of your contentlet must be 0.

Parameters:
contentlet - - The inode of your contentlet must be 0.
contentRelationships - - throws IllegalArgumentException if null. Used to set relationships to new contentlet version
cats - - throws IllegalArgumentException if null. Used to set categories to new contentlet version
user -
respectFrontendRoles -

checkin

boolean checkin(Contentlet contentlet,
                com.liferay.portal.model.User user,
                boolean respectFrontendRoles)
Will check in a new version of you contentlet. The inode of your contentlet must be 0.

Parameters:
contentlet - - The inode of your contentlet must be 0.
user -
respectFrontendRoles -

checkin

boolean checkin(Contentlet contentlet,
                java.util.Map<Relationship,java.util.List<Contentlet>> contentRelationships,
                com.liferay.portal.model.User user,
                boolean respectFrontendRoles)
Will check in a new version of you contentlet. The inode of your contentlet must be 0.

Parameters:
contentlet - - The inode of your contentlet must be 0.
contentRelationships - - throws IllegalArgumentException if null. Used to set relationships to new contentlet version
user -
respectFrontendRoles -

checkinWithoutVersioning

boolean checkinWithoutVersioning(Contentlet contentlet,
                                 java.util.Map<Relationship,java.util.List<Contentlet>> contentRelationships,
                                 java.util.List<Category> cats,
                                 java.util.List<Permission> permissions,
                                 com.liferay.portal.model.User user,
                                 boolean respectFrontendRoles)
Will check in a update of your contentlet without generate a new version. The inode of your contentlet must be different from 0.

Parameters:
contentlet - - The inode of your contentlet must be different from 0.
contentRelationships - - Used to set relationships to updated contentlet version
user -
respectFrontendRoles -

restoreVersion

boolean restoreVersion(Contentlet contentlet,
                       com.liferay.portal.model.User user,
                       boolean respectFrontendRoles)
Will make the passed in contentlet the working copy.

Parameters:
contentlet -
user -
respectFrontendRoles -

findAllVersions

boolean findAllVersions(Identifier identifier,
                        com.liferay.portal.model.User user,
                        boolean respectFrontendRoles)
Retrieves all versions for a contentlet identifier Note this method should not be used currently because it could pull too many versions.

Parameters:
identifier -
user -
respectFrontendRoles -
Returns:

findAllUserVersions

boolean findAllUserVersions(Identifier identifier,
                            com.liferay.portal.model.User user,
                            boolean respectFrontendRoles)
Retrieves all versions for a contentlet identifier checked in by a real user meaning not the system user

Parameters:
identifier -
user -
respectFrontendRoles -
Returns:

getName

boolean getName(Contentlet contentlet,
                com.liferay.portal.model.User user,
                boolean respectFrontendRoles)
Meant to get the title or name of a contentlet

Parameters:
contentlet -
user -
respectFrontendRoles -
Returns:

copyProperties

boolean copyProperties(Contentlet contentlet,
                       java.util.Map<java.lang.String,java.lang.Object> properties)
Copies properties from the map to the contentlet

Parameters:
contentlet - contentlet to copy to
properties -

isContentlet

boolean isContentlet(java.lang.String inode)
Use to check if the inode id is a contentlet

Parameters:
inode - id to check
Returns:

find

boolean find(Category category,
             long languageId,
             boolean live,
             java.lang.String orderBy,
             com.liferay.portal.model.User user,
             boolean respectFrontendRoles)
Will return all content assigned to a specified Category

Parameters:
category - Category to look for
languageId - language to pull content for. If 0 will return all languages
live - should return live or working content
orderBy - indexName(previously known as dbColumnName) to order by. Can be null or empty string
user -
respectFrontendRoles -
Returns:

find

boolean find(java.util.List<Category> categories,
             long languageId,
             boolean live,
             java.lang.String orderBy,
             com.liferay.portal.model.User user,
             boolean respectFrontendRoles)
Will return all content assigned to a specified Categories

Parameters:
categories - - List of categories to look for
languageId - language to pull content for. If 0 will return all languages
category - Category to look for
live - should return live or working content
orderBy - indexName(previously known as dbColumnName) to order by. Can be null or empty string
user -
respectFrontendRoles -
Returns:

setContentletProperty

boolean setContentletProperty(Contentlet contentlet,
                              Field field,
                              java.lang.Object value)
Use to set contentlet properties. The value should be String, the proper type of the property

Parameters:
contentlet -
field -
value -
user -
respectFrontendRoles -

validateContentlet

boolean validateContentlet(Contentlet contentlet,
                           java.util.List<Category> cats)
Use to validate your contentlet.

Parameters:
contentlet -
categories -

validateContentlet

boolean validateContentlet(Contentlet contentlet,
                           java.util.Map<Relationship,java.util.List<Contentlet>> contentRelationships,
                           java.util.List<Category> cats)
Use to validate your contentlet.

Parameters:
contentlet -
contentRelationships -
categories - Use the notValidFields property of the exception to get which fields where not valid

validateContentlet

boolean validateContentlet(Contentlet contentlet,
                           ContentletRelationships contentRelationships,
                           java.util.List<Category> cats)
Use to validate your contentlet.

Parameters:
contentlet -
contentRelationships -
categories -

isFieldTypeString

boolean isFieldTypeString(Field field)
Use to determine if if the field value is a String value withing the contentlet object

Parameters:
field -
Returns:

isFieldTypeDate

boolean isFieldTypeDate(Field field)
Use to determine if if the field value is a Date value withing the contentlet object

Parameters:
field -
Returns:

isFieldTypeLong

boolean isFieldTypeLong(Field field)
Use to determine if if the field value is a Long value withing the contentlet object

Parameters:
field -
Returns:

isFieldTypeBoolean

boolean isFieldTypeBoolean(Field field)
Use to determine if if the field value is a Boolean value withing the contentlet object

Parameters:
field -
Returns:

isFieldTypeFloat

boolean isFieldTypeFloat(Field field)
Use to determine if if the field value is a Float value withing the contentlet object

Parameters:
field -
Returns:

convertFatContentletToContentlet

boolean convertFatContentletToContentlet(Contentlet fatty)
Converts a "fat" (legacy) contentlet into a new contentlet.

Parameters:
Fat - contentlet to be converted.
Returns:

convertContentletToFatContentlet

boolean convertContentletToFatContentlet(Contentlet cont,
                                         Contentlet fatty)
Converts a "light" contentlet into a "fat" (legacy) contentlet.

Parameters:
A - "light" contentlet to be converted.
Returns:

applyStructurePermissionsToChildren

boolean applyStructurePermissionsToChildren(Structure structure,
                                            com.liferay.portal.model.User user,
                                            java.util.List<Permission> permissions,
                                            boolean respectFrontendRoles)
Applies permission to the child contentlets of the structure

Parameters:
structure -
user -
permissions -
respectFrontendRoles -

deleteOldContent

boolean deleteOldContent(java.util.Date deleteFrom)
Parameters:
deleteFrom -
Returns:

findFieldValues

boolean findFieldValues(java.lang.String structureInode,
                        Field field,
                        com.liferay.portal.model.User user,
                        boolean respectFrontEndRoles)
Parameters:
deleteFrom -
offset -
Returns:

getBinaryFile

boolean getBinaryFile(java.lang.String contentletInode,
                      java.lang.String velocityVariableName,
                      com.liferay.portal.model.User user)
Fetches the File Name stored under the contentlet and field

Parameters:
contentletInode -
velocityVariableName -
Returns:

contentletCount

boolean contentletCount()
                        throws DotDataException
gets the number of contentlets in the system. This number includes all versions not distinct identifiers

Returns:
Throws:
DotDataException

contentletIdentifierCount

boolean contentletIdentifierCount()
                                  throws DotDataException
gets the number of contentlet identifiers in the system. This number includes all versions not distinct identifiers

Returns:
Throws:
DotDataException

removeContentletFromIndex

boolean removeContentletFromIndex(java.lang.String contentletInodeOrIdentifier)
                                  throws DotDataException
Throws:
DotDataException

refresh

boolean refresh(Structure structure)

refresh

boolean refresh(Contentlet content)

refreshAllContent

boolean refreshAllContent()

getSiblings

boolean getSiblings(java.lang.String identifier)
                    throws DotDataException
Throws:
DotDataException

checkinWithNoIndex

boolean checkinWithNoIndex(Contentlet contentlet,
                           java.util.Map<Relationship,java.util.List<Contentlet>> contentRelationships,
                           java.util.List<Category> cats,
                           java.util.List<Permission> permissions,
                           com.liferay.portal.model.User user,
                           boolean respectFrontendRoles)

checkinWithNoIndex

boolean checkinWithNoIndex(Contentlet currentContentlet,
                           ContentletRelationships relationshipsData,
                           java.util.List<Category> cats,
                           java.util.List<Permission> selectedPermissions,
                           com.liferay.portal.model.User user,
                           boolean respectFrontendRoles)
Will check in a new version of you contentlet without indexing. The inode of your contentlet must be not set. This version of checkinWithNoIndex contains a more complex structure to pass the relationship in order to handle a same structures (where the parent and child structures are the same) kind of relationships in that case you have to specify if the role of the content is the parent of the child of the relatioship

Parameters:
currentContentlet - - The inode of your contentlet must be not set.
relationshipsData - -
cats -
selectedPermissions -
user -
respectFrontendRoles -
Returns:

checkinWithNoIndex

boolean checkinWithNoIndex(Contentlet contentlet,
                           java.util.List<Category> cats,
                           java.util.List<Permission> permissions,
                           com.liferay.portal.model.User user,
                           boolean respectFrontendRoles)
Will check in a new version of you contentlet without indexing. The inode of your contentlet must be not set.

Parameters:
contentlet - - The inode of your contentlet must be not set.
cats - - throws IllegalArgumentException if null. Used to set categories to new contentlet version
permissions - - throws IllegalArgumentException if null. Used to set permissions to new contentlet version
user -
respectFrontendRoles -

checkinWithNoIndex

boolean checkinWithNoIndex(Contentlet contentlet,
                           java.util.List<Permission> permissions,
                           com.liferay.portal.model.User user,
                           boolean respectFrontendRoles)
Will check in a new version of you contentlet without indexing. The inode of your contentlet must be not set.

Parameters:
contentlet - - The inode of your contentlet must be not set.
permissions - - throws IllegalArgumentException if null. Used to set permissions to new contentlet version
user -
respectFrontendRoles -

checkinWithNoIndex

boolean checkinWithNoIndex(Contentlet contentlet,
                           com.liferay.portal.model.User user,
                           boolean respectFrontendRoles,
                           java.util.List<Category> cats)
Will check in a new version of you contentlet without indexing. The inode of your contentlet must be not set.

Parameters:
contentlet - - The inode of your contentlet must be not set.
contentRelationships - - throws IllegalArgumentException if null. Used to set relationships to new contentlet version
cats - - throws IllegalArgumentException if null. Used to set categories to new contentlet version
permissions - - throws IllegalArgumentException if null. Used to set permissions to new contentlet version
user -
respectFrontendRoles -

checkinWithNoIndex

boolean checkinWithNoIndex(Contentlet contentlet,
                           java.util.Map<Relationship,java.util.List<Contentlet>> contentRelationships,
                           java.util.List<Category> cats,
                           com.liferay.portal.model.User user,
                           boolean respectFrontendRoles)
Will check in a new version of you contentlet without indexing. The inode of your contentlet must be not set.

Parameters:
contentlet - - The inode of your contentlet must be not set.
contentRelationships - - throws IllegalArgumentException if null. Used to set relationships to new contentlet version
cats - - throws IllegalArgumentException if null. Used to set categories to new contentlet version
user -
respectFrontendRoles -

checkinWithNoIndex

boolean checkinWithNoIndex(Contentlet contentlet,
                           com.liferay.portal.model.User user,
                           boolean respectFrontendRoles)
Will check in a new version of you contentlet without indexing. The inode of your contentlet must be not set.

Parameters:
contentlet - - The inode of your contentlet must be not set.
user -
respectFrontendRoles -

checkinWithNoIndex

boolean checkinWithNoIndex(Contentlet contentlet,
                           java.util.Map<Relationship,java.util.List<Contentlet>> contentRelationships,
                           com.liferay.portal.model.User user,
                           boolean respectFrontendRoles)
Will check in a new version of you contentlet without indexing The inode of your contentlet must be not set.

Parameters:
contentlet - - The inode of your contentlet must be not set.
contentRelationships - - throws IllegalArgumentException if null. Used to set relationships to new contentlet version
user -
respectFrontendRoles -

DBSearch

boolean DBSearch(GenericQueryFactory.Query query,
                 com.liferay.portal.model.User user,
                 boolean respectFrontendRoles)
                 throws ValidationException,
                        DotDataException
Parameters:
query -
user -
respectFrontendRoles -
Returns:
Throws:
ValidationException
DotDataException

isInodeIndexed

boolean isInodeIndexed(java.lang.String inode)
Method will time out after 30 seconds returning false

Parameters:
inode -
Returns:

isInodeIndexed

boolean isInodeIndexed(java.lang.String inode,
                       boolean live)

isInodeIndexed

boolean isInodeIndexed(java.lang.String inode,
                       int secondsToWait)
Method will time out after 30 seconds returning false

Parameters:
inode -
secondsToWait - - how long to wait before timing out
Returns:

UpdateContentWithSystemHost

boolean UpdateContentWithSystemHost(java.lang.String hostIdentifier)
                                    throws DotDataException
Method will update hostInode of content to systemhost

Parameters:
identifier -
Throws:
DotDataException

removeUserReferences

boolean removeUserReferences(java.lang.String userId)
                             throws DotDataException
Method will remove User References of the given userId in Contentlet

Parameters:
userId -
Throws:
DotDataException

getUrlMapForContentlet

boolean getUrlMapForContentlet(Contentlet contentlet,
                               com.liferay.portal.model.User user,
                               boolean respectFrontendRoles)
                               throws DotSecurityException,
                                      DotDataException
Return the URL Map for the specified content if the structure associated to the content has the URL Map Pattern set.

Parameters:
contentlet -
user -
respectFrontendRoles -
Returns:
Throws:
DotSecurityException
DotDataException

deleteVersion

boolean deleteVersion(Contentlet contentlet,
                      com.liferay.portal.model.User user,
                      boolean respectFrontendRoles)
                      throws DotDataException,
                             DotSecurityException
Deletes the given version of the contentlet from the system

Parameters:
contentlet -
user -
respectFrontendRoles -
Throws:
DotDataException
DotSecurityException

saveDraft

boolean saveDraft(Contentlet contentlet,
                  java.util.Map<Relationship,java.util.List<Contentlet>> contentRelationships,
                  java.util.List<Category> cats,
                  java.util.List<Permission> permissions,
                  com.liferay.portal.model.User user,
                  boolean respectFrontendRoles)
                  throws java.lang.IllegalArgumentException,
                         DotDataException,
                         DotSecurityException,
                         DotContentletStateException,
                         DotContentletValidationException
Checks if the version you are saving is live=false. If it is, this method will save WITHOUT creating a new version. Otherwise, it will create a new working (Draft) version and return it to you

Parameters:
contentlet - - The inode of your contentlet must not be null.
contentRelationships - - throws IllegalArgumentException if null. Used to set relationships to new contentlet version
cats - - throws IllegalArgumentException if null. Used to set categories to new contentlet version
permissions - - throws IllegalArgumentException if null. Used to set permissions to new contentlet version
user -
respectFrontendRoles -
Throws:
java.lang.IllegalArgumentException
DotDataException
DotSecurityException
DotContentletStateException - If inode null
DotContentletValidationException - If content is not valid

searchByIdentifier

boolean searchByIdentifier(java.lang.String luceneQuery,
                           int limit,
                           int offset,
                           java.lang.String sortBy,
                           com.liferay.portal.model.User user,
                           boolean respectFrontendRoles)
                           throws DotDataException,
                                  DotSecurityException,
                                  org.apache.lucene.queryParser.ParseException
The search here takes a lucene query and pulls Contentlets for you, using the identifier of the contentlet.You can pass sortBy as null if you do not have a field to sort by. limit should be 0 if no limit and the offset should be -1 is you are not paginating. The returned list will be filtered with only the contentlets that the user can read(use). you can of course also pass permissions to further limit in the lucene query itself

Parameters:
luceneQuery -
limit -
offset -
sortBy -
user -
respectFrontendRoles -
Returns:
Throws:
DotDataException
DotSecurityException
org.apache.lucene.queryParser.ParseException

searchByIdentifier

boolean searchByIdentifier(java.lang.String luceneQuery,
                           int limit,
                           int offset,
                           java.lang.String sortBy,
                           com.liferay.portal.model.User user,
                           boolean respectFrontendRoles,
                           int requiredPermission)
                           throws DotDataException,
                                  DotSecurityException,
                                  org.apache.lucene.queryParser.ParseException
The search here takes a lucene query and pulls Contentlets for you, using the identifier of the contentlet.You can pass sortBy as null if you do not have a field to sort by. limit should be 0 if no limit and the offset should be -1 is you are not paginating. The returned list will be filtered with only the contentlets that match the required permission. You can of course also pass permissions to further limit in the lucene query itself

Parameters:
luceneQuery -
limit -
offset -
sortBy - indexName(previously known as dbColumnName) to order by. Can be null or empty string
user -
respectFrontendRoles -
requiredPermission -
Returns:
Throws:
DotDataException
DotSecurityException
org.apache.lucene.queryParser.ParseException

searchByIdentifier

boolean searchByIdentifier(java.lang.String luceneQuery,
                           int limit,
                           int offset,
                           java.lang.String sortBy,
                           com.liferay.portal.model.User user,
                           boolean respectFrontendRoles,
                           int requiredPermission,
                           boolean anyLanguage)
                           throws DotDataException,
                                  DotSecurityException,
                                  org.apache.lucene.queryParser.ParseException
The search here takes a lucene query and pulls Contentlets for you, using the identifier of the contentlet.You can pass sortBy as null if you do not have a field to sort by. limit should be 0 if no limit and the offset should be -1 is you are not paginating. The returned list will be filtered with only the contentlets that match the required permission. You can of course also pass permissions to further limit in the lucene query itself Searches default langugae if anyLanguage is false, and searches all languages if anyLanguage is true.

Parameters:
luceneQuery -
limit -
offset -
sortBy - indexName(previously known as dbColumnName) to order by. Can be null or empty string
user -
respectFrontendRoles -
requiredPermission -
anyLanguage -
Returns:
Throws:
DotDataException
DotSecurityException
org.apache.lucene.queryParser.ParseException

refreshContentUnderHost

boolean refreshContentUnderHost(Host host)
                                throws DotReindexStateException
Reindexes content under a given host + refreshes the content from cache

Parameters:
host -
Returns:
Throws:
DotReindexStateException

refreshContentUnderFolder

boolean refreshContentUnderFolder(Folder folder)
                                  throws DotReindexStateException
Reindexes content under a given folder + refreshes the content from cache

Parameters:
folder -
Returns:
Throws:
DotReindexStateException

removeFolderReferences

boolean removeFolderReferences(Folder folder)
                               throws DotDataException
Will update contents that reference the given folder to point to it's parent folder, if it's a top folder it will set folder to be SYSTEM_FOLDER

Parameters:
folder -
Throws:
DotDataException

canLock

boolean canLock(Contentlet contentlet,
                com.liferay.portal.model.User user)
                throws DotLockException
Throws:
DotLockException

searchIndexCount

boolean searchIndexCount(java.lang.String luceneQuery,
                         com.liferay.portal.model.User user,
                         boolean respectFrontendRoles)

findContentRelationships

boolean findContentRelationships(Contentlet contentlet,
                                 com.liferay.portal.model.User user)
                                 throws DotDataException,
                                        DotSecurityException
Returns the ContentRelationships Map for the specified content.

Parameters:
contentlet -
user -
Returns:
Map with the ContentRelationships. Empty Map if the content doesn't have associated relationships.
Throws:
DotDataException
DotSecurityException

loadField

boolean loadField(java.lang.String inode,
                  Field field)
                  throws DotDataException
Throws:
DotDataException

indexCount

boolean indexCount(java.lang.String luceneQuery,
                   com.liferay.portal.model.User user,
                   boolean respectFrontendRoles)

getMostViewedContent

boolean getMostViewedContent(java.lang.String structureVariableName,
                             java.lang.String startDate,
                             java.lang.String endDate,
                             com.liferay.portal.model.User user)
Gets the top viewed content for a particular structure for a specified date interval

Parameters:
structureVariableName -
startDate -
endDate -
user -
Returns:


Copyright © 2013 dotCMS Inc. All Rights Reserved.