com.dotmarketing.portlets.contentlet.business
Class ContentletAPIInterceptor

java.lang.Object
  extended by com.dotmarketing.portlets.contentlet.business.ContentletAPIInterceptor
All Implemented Interfaces:
Interceptor, ContentletAPI

public class ContentletAPIInterceptor
extends java.lang.Object
implements ContentletAPI, Interceptor

Since:
1.6.5c
Author:
Jason Tesser

Constructor Summary
ContentletAPIInterceptor()
           
 
Method Summary
 void 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
 void 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
 void 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
 void addPostHook(java.lang.Object postHook)
          Adds a hook to the end of the chain
 void addPostHook(java.lang.String className)
          Adds a hook to the end of the chain
 void addPostHook(java.lang.String className, int indexToAddAt)
          Adds a hook to the list at the specified index
 void addPreHook(java.lang.Object preHook)
          Adds a hook to the end of the chain
 void addPreHook(java.lang.String className)
          Adds a hook to the end of the chain
 void addPreHook(java.lang.String className, int indexToAddAt)
          Adds a hook to the list at the specified index
 void archive(Contentlet contentlet, com.liferay.portal.model.User user, boolean respectFrontendRoles)
          This method archives the given contentlet
 void 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)
          Tests whether a user can potentially lock a piece of content (needed to test before publish, etc).
 Contentlet 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.
 Contentlet 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.
 Contentlet 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.
 Contentlet 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.
 Contentlet 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.
 Contentlet 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.
 Contentlet checkin(Contentlet contentlet, com.liferay.portal.model.User user, boolean respectFrontendRoles)
          Will check in a new version of you contentlet.
 Contentlet 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.
 Contentlet 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 generating a new version.
 java.util.List<Contentlet> 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.
 Contentlet 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 Note that this method is only intended for use with Checkin methods.
 java.util.List<Contentlet> 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 Note that this method is only intended for use with Checkin methods.
 java.util.List<Contentlet> 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.
 void 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.
 void cleanHostField(Structure structure, com.liferay.portal.model.User user, boolean respectFrontendRoles)
          Will get all the contentlets for a structure and set the system host and system folder for the host values Will check Write/Edit permissions on the Contentlet.
 long contentletCount()
          gets the number of contentlets in the system.
 long contentletIdentifierCount()
          gets the number of contentlet identifiers in the system.
 Contentlet convertContentletToFatContentlet(Contentlet cont, Contentlet fatty)
          Converts a "light" contentlet into a "fat" (legacy) contentlet.
 Contentlet convertFatContentletToContentlet(Contentlet fatty)
          Converts a "fat" (legacy) contentlet into a new contentlet.
 Contentlet copyContentlet(Contentlet contentlet, Folder folder, com.liferay.portal.model.User user, boolean respectFrontendRoles)
          Copies a contentlet, including all its fields including binary files, image and file fields are pointers and the are preserved as the are so if source contentlet points to image A and resulting new contentlet will point to same image A as well, also copies source permissions.
 Contentlet copyContentlet(Contentlet contentlet, Folder folder, com.liferay.portal.model.User user, boolean appendCopyToFileName, boolean respectFrontendRoles)
          Copies a contentlet, including all its fields including binary files, image and file fields are pointers and the are preserved as the are so if source contentlet points to image A and resulting new contentlet will point to same image A as well, also copies source permissions.
 Contentlet copyContentlet(Contentlet contentlet, Host host, com.liferay.portal.model.User user, boolean respectFrontendRoles)
          Copies a contentlet, including all its fields including binary files, image and file fields are pointers and the are preserved as the are so if source contentlet points to image A and resulting new contentlet will point to same image A as well, also copies source permissions.
 Contentlet copyContentlet(Contentlet contentlet, com.liferay.portal.model.User user, boolean respectFrontendRoles)
          Copies a contentlet, including all its fields including binary files, image and file fields are pointers and the are preserved as the are so if source contentlet points to image A and resulting new contentlet will point to same image A as well, also copies source permissions.
 void copyProperties(Contentlet contentlet, java.util.Map<java.lang.String,java.lang.Object> properties)
          Copies properties from the map to the contentlet
 java.util.List<java.util.Map<java.lang.String,java.io.Serializable>> DBSearch(GenericQueryFactory.Query query, com.liferay.portal.model.User user, boolean respectFrontendRoles)
          Will search the DB.
 void delete(Contentlet contentlet, com.liferay.portal.model.User user, boolean respectFrontendRoles)
          This method completely deletes the given contentlet from the system
 void delete(Contentlet contentlet, com.liferay.portal.model.User user, boolean respectFrontendRoles, boolean allVersions)
          This method completely deletes the given contentlet from the system.
 void delete(java.util.List<Contentlet> contentlets, com.liferay.portal.model.User user, boolean respectFrontendRoles)
          This method completely deletes the given contentlet from the system
 void 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.
 void deleteAllVersionsandBackup(java.util.List<Contentlet> contentlets, com.liferay.portal.model.User user, boolean respectFrontendRoles)
          This method completely deletes the given contentlet from the system and make a xml file backup
 int deleteOldContent(java.util.Date deleteFrom)
           
 void 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
 void deleteRelatedContent(Contentlet contentlet, Relationship relationship, com.liferay.portal.model.User user, boolean respectFrontendRoles)
          Deletes all related content from passed in contentlet and relationship
 void deleteVersion(Contentlet contentlet, com.liferay.portal.model.User user, boolean respectFrontendRoles)
          Deletes the given version of the contentlet from the system
 void delPostHook(int indexToRemAt)
          Removes a hook from the list at the specified index
 void delPostHook(java.lang.Object postHook)
          Removes a given hook from the list
 void delPreHook(int indexToRemAt)
          Removes a hook from the list at the specified index
 void delPreHook(java.lang.Object preHook)
          Removes a given hook from the list
 java.util.List<Contentlet> 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
 java.util.List<Contentlet> 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
 Contentlet find(java.lang.String inode, com.liferay.portal.model.User user, boolean respectFrontendRoles)
          Finds a Contentlet Object given the inode
 java.util.List<Contentlet> findAllContent(int offset, int limit)
          Use to retrieve all version of all content in the database.
 java.util.List<Contentlet> 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
 java.util.List<Contentlet> 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.
 java.util.List<Contentlet> findByStructure(java.lang.String structureInode, com.liferay.portal.model.User user, boolean respectFrontendRoles, int limit, int offset)
          Returns all Contentlets for a specific structure
 java.util.List<Contentlet> findByStructure(Structure structure, com.liferay.portal.model.User user, boolean respectFrontendRoles, int limit, int offset)
          Returns all Contentlets for a specific structure
 Contentlet findContentletByIdentifier(java.lang.String identifier, boolean live, long languageId, com.liferay.portal.model.User user, boolean respectFrontendRoles)
          Retrieves a contentlet from the Lucene index + cache first, then falls back to the database if not found based on its identifier
 Contentlet findContentletForLanguage(long languageId, Identifier contentletId)
          Returns a live Contentlet Object for a given language
 java.util.List<Contentlet> findContentlets(java.util.List<java.lang.String> inodes)
          Gets a list of Contentlets from a passed in list of inodes.
 java.util.List<Contentlet> findContentletsByFolder(Folder parentFolder, com.liferay.portal.model.User user, boolean respectFrontendRoles)
          Gets a list of Contentlets from a given parent folder
 java.util.List<Contentlet> findContentletsByHost(Host parentHost, com.liferay.portal.model.User user, boolean respectFrontendRoles)
          Gets a list of Contentlets from a given parent host, retrieves the working version of content
 java.util.List<Contentlet> 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
 java.util.Map<Relationship,java.util.List<Contentlet>> findContentRelationships(Contentlet contentlet, com.liferay.portal.model.User user)
          Returns the ContentRelationships Map for the specified content.
 java.util.List<java.lang.String> findFieldValues(java.lang.String structureInode, Field field, com.liferay.portal.model.User user, boolean respectFrontEndRoles)
           
 java.util.List<Contentlet> 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.
 java.util.List<Contentlet> 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.
 ContentletRelationships getAllRelationships(Contentlet contentlet)
          Returns all contentlet's relationships for a given contentlet object
 ContentletRelationships getAllRelationships(java.lang.String contentletInode, com.liferay.portal.model.User user, boolean respectFrontendRoles)
          Returns all contentlet's relationships for a given contentlet inode
 java.io.File 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
 java.util.List<java.util.Map<java.lang.String,java.lang.Object>> getContentletReferences(Contentlet contentlet, com.liferay.portal.model.User user, boolean respectFrontendRoles)
          Retrieves all references for a Contentlet.
 java.lang.Object getFieldValue(Contentlet contentlet, Field theField)
          Gets the value of a field with a given contentlet
 java.util.List<java.util.Map<java.lang.String,java.lang.String>> getMostViewedContent(java.lang.String structureVariableName, java.lang.String startDate, java.lang.String endDate, com.liferay.portal.model.User user)
          Gets the top viewed contents identifiers and numberOfViews for a particular structure for a specified date interval
 java.lang.String getName(Contentlet contentlet, com.liferay.portal.model.User user, boolean respectFrontendRoles)
          Meant to get the title or name of a contentlet
 java.util.Date getNextReview(Contentlet content, com.liferay.portal.model.User user, boolean respectFrontendRoles)
          Finds the next date that a contentlet must be reviewed
 java.util.List<java.lang.String> getPostHooks()
          All class names of the hooks
 java.util.List<java.lang.String> getPreHooks()
          All class names of the hooks
 java.util.List<Contentlet> 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
 java.util.List<Contentlet> 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
 java.util.List<File> getRelatedFiles(Contentlet contentlet, com.liferay.portal.model.User user, boolean respectFrontendRoles)
          Get all the files relates to the contentlet
 Identifier 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
 java.util.List<Link> getRelatedLinks(Contentlet contentlet, com.liferay.portal.model.User user, boolean respectFrontendRoles)
          Gets all related links to the contentlet
 java.util.List<Contentlet> getSiblings(java.lang.String identifier)
           
 java.lang.String 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.
 long indexCount(java.lang.String luceneQuery, com.liferay.portal.model.User user, boolean respectFrontendRoles)
          Allows to count how many records match the specified lucene query and user
 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)
          this version optionaly adds a +live:true to the search if parameter live is true.
 boolean isInodeIndexed(java.lang.String inode, int secondsToWait)
          Method will time out after 30 seconds returning false
 java.lang.Object loadField(java.lang.String inode, Field field)
          Reads the field from storage.
 void lock(Contentlet contentlet, com.liferay.portal.model.User user, boolean respectFrontendRoles)
          Use to lock a contentlet
 void publish(Contentlet contentlet, com.liferay.portal.model.User user, boolean respectFrontendRoles)
          Publishes a piece of content.
 void publish(java.util.List<Contentlet> contentlets, com.liferay.portal.model.User user, boolean respectFrontendRoles)
          Publishes a piece of content.
 void publishRelatedHtmlPages(Contentlet contentlet)
          Publishes all related HTMLPage
 void refresh(Contentlet contentlet)
          Reindexes a single content + refreshes it from cache
 void refresh(Structure structure)
          Reindexes content for a given structure + refreshes the content from cache
 void refreshAllContent()
          Reindexes all content + clear the content caches
 void refreshContentUnderFolder(Folder folder)
          Reindexes content under a given folder + refreshes the content from cache
 void refreshContentUnderHost(Host host)
          Reindexes content under a given host + refreshes the content from cache
 void reindex()
          Reindex all content
 void reindex(Contentlet contentlet)
          reindex a single content
 void reindex(Structure structure)
          reindex content for a given structure
 void 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
 void 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
 void 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
 void removeUserReferences(java.lang.String userId)
          Method will remove User References of the given userId in Contentlet
 void restoreVersion(Contentlet contentlet, com.liferay.portal.model.User user, boolean respectFrontendRoles)
          Will make the passed in contentlet the working copy.
 Contentlet 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.
 java.util.List<Contentlet> 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.
 java.util.List<Contentlet> 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.
 java.util.List<Contentlet> 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.
 java.util.List<Contentlet> 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.
 java.util.List<Contentlet> 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.
 java.util.List<ContentletSearch> 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.
 void setContentletProperty(Contentlet contentlet, Field field, java.lang.Object value)
          Use to set contentlet properties.
 void unarchive(Contentlet contentlet, com.liferay.portal.model.User user, boolean respectFrontendRoles)
          This method unarchives the given contentlet
 void unarchive(java.util.List<Contentlet> contentlets, com.liferay.portal.model.User user, boolean respectFrontendRoles)
          This method unarchives the given contentlets
 void unlock(Contentlet contentlet, com.liferay.portal.model.User user, boolean respectFrontendRoles)
           
 void unpublish(Contentlet contentlet, com.liferay.portal.model.User user, boolean respectFrontendRoles)
          This method unpublishes the given contentlet
 void unpublish(java.util.List<Contentlet> contentlets, com.liferay.portal.model.User user, boolean respectFrontendRoles)
          This method unpublishes the given contentlet
 void UpdateContentWithSystemHost(java.lang.String hostIdentifier)
          Method will update hostInode of content to systemhost
 void validateContentlet(Contentlet contentlet, ContentletRelationships contentRelationships, java.util.List<Category> cats)
          Use to validate your contentlet.
 void validateContentlet(Contentlet contentlet, java.util.List<Category> cats)
          Use to validate your contentlet.
 void validateContentlet(Contentlet contentlet, java.util.Map<Relationship,java.util.List<Contentlet>> contentRelationships, java.util.List<Category> cats)
          Use to validate your contentlet.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ContentletAPIInterceptor

public ContentletAPIInterceptor()
Method Detail

addFileToContentlet

public void addFileToContentlet(Contentlet contentlet,
                                java.lang.String fileInode,
                                java.lang.String relationName,
                                com.liferay.portal.model.User user,
                                boolean respectFrontendRoles)
                         throws DotSecurityException,
                                DotDataException
Description copied from interface: ContentletAPI
Adds a relationship to a contentlet

Specified by:
addFileToContentlet in interface ContentletAPI
Throws:
DotDataException
DotSecurityException

addImageToContentlet

public void addImageToContentlet(Contentlet contentlet,
                                 java.lang.String imageInode,
                                 java.lang.String relationName,
                                 com.liferay.portal.model.User user,
                                 boolean respectFrontendRoles)
                          throws DotSecurityException,
                                 DotDataException
Description copied from interface: ContentletAPI
Adds a relationship to a contentlet

Specified by:
addImageToContentlet in interface ContentletAPI
Throws:
DotSecurityException
DotDataException

addLinkToContentlet

public void addLinkToContentlet(Contentlet contentlet,
                                java.lang.String linkInode,
                                java.lang.String relationName,
                                com.liferay.portal.model.User user,
                                boolean respectFrontendRoles)
                         throws DotSecurityException,
                                DotDataException
Description copied from interface: ContentletAPI
Adds a relationship to a contentlet

Specified by:
addLinkToContentlet in interface ContentletAPI
Throws:
DotSecurityException
DotDataException

archive

public void archive(Contentlet contentlet,
                    com.liferay.portal.model.User user,
                    boolean respectFrontendRoles)
             throws DotDataException,
                    DotSecurityException,
                    DotContentletStateException
Description copied from interface: ContentletAPI
This method archives the given contentlet

Specified by:
archive in interface ContentletAPI
Throws:
DotDataException
DotSecurityException
DotContentletStateException

archive

public void archive(java.util.List<Contentlet> contentlets,
                    com.liferay.portal.model.User user,
                    boolean respectFrontendRoles)
             throws DotDataException,
                    DotSecurityException,
                    DotContentletStateException
Description copied from interface: ContentletAPI
This method archives the given contentlets

Specified by:
archive in interface ContentletAPI
Throws:
DotDataException
DotSecurityException
DotContentletStateException

checkin

public Contentlet 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)
                   throws java.lang.IllegalArgumentException,
                          DotDataException,
                          DotSecurityException,
                          DotContentletStateException,
                          DotContentletValidationException
Description copied from interface: ContentletAPI
Will check in a new version of you contentlet. The inode of your contentlet must be 0. Note that the contentlet argument must be obtained using checkout methods.

Specified by:
checkin in interface ContentletAPI
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
Throws:
java.lang.IllegalArgumentException
DotDataException
DotSecurityException
DotContentletStateException - If inode not = to 0
DotContentletValidationException - If content is not valid

checkin

public Contentlet checkin(Contentlet currentContentlet,
                          ContentletRelationships relationshipsData,
                          java.util.List<Category> cats,
                          java.util.List<Permission> selectedPermissions,
                          com.liferay.portal.model.User user,
                          boolean respectFrontendRoles)
                   throws java.lang.IllegalArgumentException,
                          DotDataException,
                          DotSecurityException,
                          DotContentletStateException,
                          DotContentletValidationException
Description copied from interface: ContentletAPI
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. Note that the contentlet argument must be obtained using checkout methods.

Specified by:
checkin in interface ContentletAPI
Parameters:
currentContentlet - - The inode of your contentlet must be 0.
relationshipsData - -
Returns:
Throws:
java.lang.IllegalArgumentException
DotDataException
DotSecurityException
DotContentletStateException
DotContentletValidationException

checkin

public Contentlet checkin(Contentlet contentlet,
                          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
Description copied from interface: ContentletAPI
Will check in a new version of you contentlet. The inode of your contentlet must be 0. Note that the contentlet argument must be obtained using checkout methods.

Specified by:
checkin in interface ContentletAPI
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
Throws:
java.lang.IllegalArgumentException
DotDataException
DotSecurityException
DotContentletStateException - If inode not = to 0
DotContentletValidationException - If content is not valid

checkin

public Contentlet checkin(Contentlet contentlet,
                          java.util.List<Permission> permissions,
                          com.liferay.portal.model.User user,
                          boolean respectFrontendRoles)
                   throws java.lang.IllegalArgumentException,
                          DotDataException,
                          DotSecurityException,
                          DotContentletStateException,
                          DotContentletValidationException
Description copied from interface: ContentletAPI
Will check in a new version of you contentlet. The inode of your contentlet must be 0. Note that the contentlet argument must be obtained using checkout methods.

Specified by:
checkin in interface ContentletAPI
Parameters:
contentlet - - The inode of your contentlet must be 0.
permissions - - throws IllegalArgumentException if null. Used to set permissions to new contentlet version
Throws:
java.lang.IllegalArgumentException
DotDataException
DotSecurityException
DotContentletStateException - If inode not = to 0
DotContentletValidationException - If content is not valid

checkin

public Contentlet checkin(Contentlet contentlet,
                          com.liferay.portal.model.User user,
                          boolean respectFrontendRoles,
                          java.util.List<Category> cats)
                   throws java.lang.IllegalArgumentException,
                          DotDataException,
                          DotSecurityException,
                          DotContentletStateException,
                          DotContentletValidationException
Description copied from interface: ContentletAPI
Will check in a new version of you contentlet. The inode of your contentlet must be 0. Note that the contentlet argument must be obtained using checkout methods.

Specified by:
checkin in interface ContentletAPI
Parameters:
contentlet - - The inode of your contentlet must be 0.
cats - - throws IllegalArgumentException if null. Used to set categories to new contentlet version
Throws:
java.lang.IllegalArgumentException
DotDataException
DotSecurityException
DotContentletStateException - If inode not = to 0
DotContentletValidationException - If content is not valid

checkin

public Contentlet 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)
                   throws java.lang.IllegalArgumentException,
                          DotDataException,
                          DotSecurityException,
                          DotContentletStateException,
                          DotContentletValidationException
Description copied from interface: ContentletAPI
Will check in a new version of you contentlet. The inode of your contentlet must be 0. Note that the contentlet argument must be obtained using checkout methods.

Specified by:
checkin in interface ContentletAPI
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
Throws:
java.lang.IllegalArgumentException
DotDataException
DotSecurityException
DotContentletStateException - If inode not = to 0
DotContentletValidationException - If content is not valid

checkin

public Contentlet checkin(Contentlet contentlet,
                          com.liferay.portal.model.User user,
                          boolean respectFrontendRoles)
                   throws java.lang.IllegalArgumentException,
                          DotDataException,
                          DotSecurityException,
                          DotContentletStateException,
                          DotContentletValidationException
Description copied from interface: ContentletAPI
Will check in a new version of you contentlet. The inode of your contentlet must be 0. Note that the contentlet argument must be obtained using checkout methods.

Specified by:
checkin in interface ContentletAPI
Parameters:
contentlet - - The inode of your contentlet must be 0.
Throws:
java.lang.IllegalArgumentException
DotDataException
DotSecurityException
DotContentletStateException - If inode not = to 0
DotContentletValidationException - If content is not valid

checkin

public Contentlet checkin(Contentlet contentlet,
                          java.util.Map<Relationship,java.util.List<Contentlet>> contentRelationships,
                          com.liferay.portal.model.User user,
                          boolean respectFrontendRoles)
                   throws java.lang.IllegalArgumentException,
                          DotDataException,
                          DotSecurityException,
                          DotContentletStateException,
                          DotContentletValidationException
Description copied from interface: ContentletAPI
Will check in a new version of you contentlet. The inode of your contentlet must be 0. Note that the contentlet argument must be obtained using checkout methods.

Specified by:
checkin in interface ContentletAPI
Parameters:
contentlet - - The inode of your contentlet must be 0.
contentRelationships - - throws IllegalArgumentException if null. Used to set relationships to new contentlet version
Throws:
java.lang.IllegalArgumentException
DotDataException
DotSecurityException
DotContentletStateException - If inode not = to 0
DotContentletValidationException - If content is not valid

checkinWithoutVersioning

public Contentlet 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)
                                    throws DotDataException,
                                           DotSecurityException,
                                           DotContentletStateException,
                                           DotContentletValidationException
Description copied from interface: ContentletAPI
Will check in a update of your contentlet without generating a new version. The inode of your contentlet must be different from 0. Note this method will also atempt to publish the contentlet and related assets (when checking in) without altering the mod date or mod user. Note that the contentlet argument must be obtained using checkout methods.

Specified by:
checkinWithoutVersioning in interface ContentletAPI
Parameters:
contentlet - - The inode of your contentlet must be different from 0.
contentRelationships - - Used to set relationships to updated contentlet version
Throws:
DotDataException
DotSecurityException
DotContentletStateException - If exist another contentlet working or live
DotContentletValidationException - If content is not valid

checkout

public Contentlet checkout(java.lang.String contentletInode,
                           com.liferay.portal.model.User user,
                           boolean respectFrontendRoles)
                    throws DotDataException,
                           DotSecurityException,
                           DotContentletStateException
Description copied from interface: ContentletAPI
Allows you to checkout a content so it can be altered and checked in Note that this method is only intended for use with Checkin methods. Methods like publish, archive, unpublish,.. will fail when passing a contentlet returned by this method.

Specified by:
checkout in interface ContentletAPI
Returns:
Throws:
DotDataException
DotSecurityException
DotContentletStateException - if contentlet is not already persisted

checkout

public java.util.List<Contentlet> checkout(java.util.List<Contentlet> contentlets,
                                           com.liferay.portal.model.User user,
                                           boolean respectFrontendRoles)
                                    throws DotDataException,
                                           DotSecurityException,
                                           DotContentletStateException
Description copied from interface: ContentletAPI
Allows you to checkout contents so it can be altered and checked in. Note that this method is only intended for use with Checkin methods. Methods like publish, archive, unpublish,.. will fail when passing a contentlet returned by this method.

Specified by:
checkout in interface ContentletAPI
Returns:
Throws:
DotDataException
DotSecurityException
DotContentletStateException

checkoutWithQuery

public java.util.List<Contentlet> checkoutWithQuery(java.lang.String luceneQuery,
                                                    com.liferay.portal.model.User user,
                                                    boolean respectFrontendRoles)
                                             throws DotDataException,
                                                    DotSecurityException,
                                                    DotContentletStateException,
                                                    org.apache.lucene.queryParser.ParseException
Description copied from interface: ContentletAPI
Allows you to checkout contents based on a lucene query so it can be altered and checked in. Note that this method is only intended for use with Checkin methods. Methods like publish, archive, unpublish,.. will fail when passing a contentlet returned by this method.

Specified by:
checkoutWithQuery in interface ContentletAPI
Returns:
Throws:
DotDataException
DotSecurityException
DotContentletStateException
org.apache.lucene.queryParser.ParseException

checkout

public java.util.List<Contentlet> checkout(java.lang.String luceneQuery,
                                           com.liferay.portal.model.User user,
                                           boolean respectFrontendRoles,
                                           int offset,
                                           int limit)
                                    throws DotDataException,
                                           DotSecurityException,
                                           DotContentletStateException,
                                           org.apache.lucene.queryParser.ParseException
Description copied from interface: ContentletAPI
Allows you to checkout contents based on a lucene query so it can be altered and checked in, in a paginated fashion Note that this method is only intended for use with Checkin methods. Methods like publish, archive, unpublish,.. will fail when passing a contentlet returned by this method.

Specified by:
checkout in interface ContentletAPI
Returns:
Throws:
DotDataException
DotSecurityException
DotContentletStateException
org.apache.lucene.queryParser.ParseException

cleanField

public void cleanField(Structure structure,
                       Field field,
                       com.liferay.portal.model.User user,
                       boolean respectFrontendRoles)
                throws DotSecurityException,
                       DotDataException
Description copied from interface: ContentletAPI
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

Specified by:
cleanField in interface ContentletAPI
Throws:
DotSecurityException
DotDataException

cleanHostField

public void cleanHostField(Structure structure,
                           com.liferay.portal.model.User user,
                           boolean respectFrontendRoles)
                    throws DotSecurityException,
                           DotDataException,
                           DotMappingException
Description copied from interface: ContentletAPI
Will get all the contentlets for a structure and set the system host and system folder for the host values 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

Specified by:
cleanHostField in interface ContentletAPI
Throws:
DotSecurityException
DotDataException
DotMappingException

convertContentletToFatContentlet

public Contentlet convertContentletToFatContentlet(Contentlet cont,
                                                   Contentlet fatty)
                                            throws DotDataException
Description copied from interface: ContentletAPI
Converts a "light" contentlet into a "fat" (legacy) contentlet.

Specified by:
convertContentletToFatContentlet in interface ContentletAPI
Returns:
Fat contentlet.
Throws:
DotDataException

convertFatContentletToContentlet

public Contentlet convertFatContentletToContentlet(Contentlet fatty)
                                            throws DotDataException,
                                                   DotSecurityException
Description copied from interface: ContentletAPI
Converts a "fat" (legacy) contentlet into a new contentlet.

Specified by:
convertFatContentletToContentlet in interface ContentletAPI
Returns:
A "light" contentlet.
Throws:
DotDataException
DotSecurityException

copyProperties

public void copyProperties(Contentlet contentlet,
                           java.util.Map<java.lang.String,java.lang.Object> properties)
                    throws DotContentletStateException,
                           DotSecurityException
Description copied from interface: ContentletAPI
Copies properties from the map to the contentlet

Specified by:
copyProperties in interface ContentletAPI
Parameters:
contentlet - contentlet to copy to
Throws:
DotContentletStateException - if the map passed in has properties that don't match the contentlet
DotSecurityException

delete

public void delete(Contentlet contentlet,
                   com.liferay.portal.model.User user,
                   boolean respectFrontendRoles)
            throws DotDataException,
                   DotSecurityException,
                   DotContentletStateException
Description copied from interface: ContentletAPI
This method completely deletes the given contentlet from the system

Specified by:
delete in interface ContentletAPI
Throws:
DotDataException
DotSecurityException
DotContentletStateException

delete

public void delete(Contentlet contentlet,
                   com.liferay.portal.model.User user,
                   boolean respectFrontendRoles,
                   boolean allVersions)
            throws DotDataException,
                   DotSecurityException,
                   DotContentletStateException
Description copied from interface: ContentletAPI
This method completely deletes the given contentlet from the system. It was added for the jira issue http://jira.dotmarketing.net/browse/DOTCMS-2059

Specified by:
delete in interface ContentletAPI
Throws:
DotDataException
DotSecurityException
DotContentletStateException

delete

public void delete(java.util.List<Contentlet> contentlets,
                   com.liferay.portal.model.User user,
                   boolean respectFrontendRoles)
            throws DotDataException,
                   DotSecurityException,
                   DotContentletStateException
Description copied from interface: ContentletAPI
This method completely deletes the given contentlet from the system

Specified by:
delete in interface ContentletAPI
Throws:
DotDataException
DotSecurityException
DotContentletStateException

delete

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

Specified by:
delete in interface ContentletAPI
Throws:
DotDataException
DotSecurityException
DotContentletStateException

deleteOldContent

public int deleteOldContent(java.util.Date deleteFrom)
                     throws DotDataException
Specified by:
deleteOldContent in interface ContentletAPI
Returns:
Throws:
DotDataException

deleteRelatedContent

public void deleteRelatedContent(Contentlet contentlet,
                                 Relationship relationship,
                                 com.liferay.portal.model.User user,
                                 boolean respectFrontendRoles)
                          throws DotDataException,
                                 DotSecurityException,
                                 DotContentletStateException
Description copied from interface: ContentletAPI
Deletes all related content from passed in contentlet and relationship

Specified by:
deleteRelatedContent in interface ContentletAPI
Throws:
DotDataException
DotSecurityException
DotContentletStateException - if contentlet doesn't have passed in relationship

deleteRelatedContent

public void deleteRelatedContent(Contentlet contentlet,
                                 Relationship relationship,
                                 boolean hasParent,
                                 com.liferay.portal.model.User user,
                                 boolean respectFrontendRoles)
                          throws DotDataException,
                                 DotSecurityException,
                                 DotContentletStateException
Description copied from interface: ContentletAPI
Deletes all related content from passed in contentlet and relationship

Specified by:
deleteRelatedContent in interface ContentletAPI
Throws:
DotDataException
DotSecurityException
DotContentletStateException - if contentlet doesn't have passed in relationship

find

public Contentlet find(java.lang.String inode,
                       com.liferay.portal.model.User user,
                       boolean respectFrontendRoles)
                throws DotDataException,
                       DotSecurityException
Description copied from interface: ContentletAPI
Finds a Contentlet Object given the inode

Specified by:
find in interface ContentletAPI
Returns:
Throws:
DotDataException
DotSecurityException

find

public java.util.List<Contentlet> find(Category category,
                                       long languageId,
                                       boolean live,
                                       java.lang.String orderBy,
                                       com.liferay.portal.model.User user,
                                       boolean respectFrontendRoles)
                                throws DotDataException,
                                       DotContentletStateException,
                                       DotSecurityException
Description copied from interface: ContentletAPI
Will return all content assigned to a specified Category

Specified by:
find in interface ContentletAPI
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
Returns:
Throws:
DotDataException
DotContentletStateException
DotSecurityException

find

public java.util.List<Contentlet> find(java.util.List<Category> categories,
                                       long languageId,
                                       boolean live,
                                       java.lang.String orderBy,
                                       com.liferay.portal.model.User user,
                                       boolean respectFrontendRoles)
                                throws DotDataException,
                                       DotContentletStateException,
                                       DotSecurityException
Description copied from interface: ContentletAPI
Will return all content assigned to a specified Categories

Specified by:
find in interface ContentletAPI
Parameters:
categories - - List of categories 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
Returns:
Throws:
DotDataException
DotContentletStateException
DotSecurityException

findAllContent

public java.util.List<Contentlet> findAllContent(int offset,
                                                 int limit)
                                          throws DotDataException
Description copied from interface: ContentletAPI
Use to retrieve all version of all content in the database. This is not a common method to use. Only use if you need to do maintenance tasks like search and replace something in every piece of content. Doesn't respect permissions.

Specified by:
findAllContent in interface ContentletAPI
Parameters:
offset - can be 0 if no offset
limit - can be 0 of no limit
Returns:
Throws:
DotDataException

findAllUserVersions

public java.util.List<Contentlet> findAllUserVersions(Identifier identifier,
                                                      com.liferay.portal.model.User user,
                                                      boolean respectFrontendRoles)
                                               throws DotSecurityException,
                                                      DotDataException,
                                                      DotStateException
Description copied from interface: ContentletAPI
Retrieves all versions for a contentlet identifier checked in by a real user meaning not the system user

Specified by:
findAllUserVersions in interface ContentletAPI
Returns:
Throws:
DotSecurityException
DotDataException
DotStateException - if the identifier is for contentlet

findAllVersions

public java.util.List<Contentlet> findAllVersions(Identifier identifier,
                                                  com.liferay.portal.model.User user,
                                                  boolean respectFrontendRoles)
                                           throws DotSecurityException,
                                                  DotDataException,
                                                  DotStateException
Description copied from interface: ContentletAPI
Retrieves all versions for a contentlet identifier Note this method should not be used currently because it could pull too many versions.

Specified by:
findAllVersions in interface ContentletAPI
Returns:
Throws:
DotSecurityException
DotDataException
DotStateException - if the identifier is for contentlet

findByStructure

public java.util.List<Contentlet> findByStructure(Structure structure,
                                                  com.liferay.portal.model.User user,
                                                  boolean respectFrontendRoles,
                                                  int limit,
                                                  int offset)
                                           throws DotDataException,
                                                  DotSecurityException
Description copied from interface: ContentletAPI
Returns all Contentlets for a specific structure

Specified by:
findByStructure in interface ContentletAPI
Returns:
Throws:
DotDataException
DotSecurityException

findByStructure

public java.util.List<Contentlet> findByStructure(java.lang.String structureInode,
                                                  com.liferay.portal.model.User user,
                                                  boolean respectFrontendRoles,
                                                  int limit,
                                                  int offset)
                                           throws DotDataException,
                                                  DotSecurityException
Description copied from interface: ContentletAPI
Returns all Contentlets for a specific structure

Specified by:
findByStructure in interface ContentletAPI
Returns:
Throws:
DotDataException
DotSecurityException

findContentletByIdentifier

public Contentlet findContentletByIdentifier(java.lang.String identifier,
                                             boolean live,
                                             long languageId,
                                             com.liferay.portal.model.User user,
                                             boolean respectFrontendRoles)
                                      throws DotDataException,
                                             DotSecurityException,
                                             DotContentletStateException
Description copied from interface: ContentletAPI
Retrieves a contentlet from the Lucene index + cache first, then falls back to the database if not found based on its identifier

Specified by:
findContentletByIdentifier in interface ContentletAPI
live - Retrieves the live version if false retrieves the working version
Returns:
Throws:
DotDataException
DotSecurityException
DotContentletStateException

findContentletForLanguage

public Contentlet findContentletForLanguage(long languageId,
                                            Identifier contentletId)
                                     throws DotDataException,
                                            DotSecurityException
Description copied from interface: ContentletAPI
Returns a live Contentlet Object for a given language

Specified by:
findContentletForLanguage in interface ContentletAPI
Returns:
Throws:
DotDataException
DotSecurityException

findContentlets

public java.util.List<Contentlet> findContentlets(java.util.List<java.lang.String> inodes)
                                           throws DotDataException,
                                                  DotSecurityException
Description copied from interface: ContentletAPI
Gets a list of Contentlets from a passed in list of inodes.

Specified by:
findContentlets in interface ContentletAPI
Returns:
Throws:
DotSecurityException
DotDataException

findContentletsByFolder

public java.util.List<Contentlet> findContentletsByFolder(Folder parentFolder,
                                                          com.liferay.portal.model.User user,
                                                          boolean respectFrontendRoles)
                                                   throws DotDataException,
                                                          DotSecurityException
Description copied from interface: ContentletAPI
Gets a list of Contentlets from a given parent folder

Specified by:
findContentletsByFolder in interface ContentletAPI
Returns:
Throws:
DotSecurityException
DotDataException

findContentletsByHost

public java.util.List<Contentlet> findContentletsByHost(Host parentHost,
                                                        com.liferay.portal.model.User user,
                                                        boolean respectFrontendRoles)
                                                 throws DotDataException,
                                                        DotSecurityException
Description copied from interface: ContentletAPI
Gets a list of Contentlets from a given parent host, retrieves the working version of content

Specified by:
findContentletsByHost in interface ContentletAPI
Returns:
Throws:
DotSecurityException
DotDataException

findContentletsByIdentifiers

public java.util.List<Contentlet> findContentletsByIdentifiers(java.lang.String[] identifiers,
                                                               boolean live,
                                                               long languageId,
                                                               com.liferay.portal.model.User user,
                                                               boolean respectFrontendRoles)
                                                        throws DotDataException,
                                                               DotSecurityException,
                                                               DotContentletStateException
Description copied from interface: ContentletAPI
Retrieves a contentlet list from the database based on a identifiers array

Specified by:
findContentletsByIdentifiers in interface ContentletAPI
Parameters:
identifiers - Array of identifiers
live - Retrieves the live version if false retrieves the working version
Returns:
List
Throws:
DotDataException
DotSecurityException
DotContentletStateException

findFieldValues

public java.util.List<java.lang.String> findFieldValues(java.lang.String structureInode,
                                                        Field field,
                                                        com.liferay.portal.model.User user,
                                                        boolean respectFrontEndRoles)
                                                 throws DotDataException
Specified by:
findFieldValues in interface ContentletAPI
Returns:
Throws:
DotDataException

findPageContentlets

public java.util.List<Contentlet> 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)
                                               throws DotSecurityException,
                                                      DotDataException
Description copied from interface: ContentletAPI
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

Specified by:
findPageContentlets in interface ContentletAPI
Returns:
Throws:
DotSecurityException
DotDataException

getAllLanguages

public java.util.List<Contentlet> getAllLanguages(Contentlet contentlet,
                                                  java.lang.Boolean isLiveContent,
                                                  com.liferay.portal.model.User user,
                                                  boolean respectFrontendRoles)
                                           throws DotDataException,
                                                  DotSecurityException
Description copied from interface: ContentletAPI
Returns a contentlet's siblings for a given contentlet object.

Specified by:
getAllLanguages in interface ContentletAPI
Returns:
a ContentletRelationships object containing all relationships for the contentlet
Throws:
DotDataException
DotSecurityException

getAllRelationships

public ContentletRelationships getAllRelationships(java.lang.String contentletInode,
                                                   com.liferay.portal.model.User user,
                                                   boolean respectFrontendRoles)
                                            throws DotDataException,
                                                   DotSecurityException
Description copied from interface: ContentletAPI
Returns all contentlet's relationships for a given contentlet inode

Specified by:
getAllRelationships in interface ContentletAPI
Returns:
a ContentletRelationships object containing all relationships for the contentlet
Throws:
DotDataException
DotSecurityException

getAllRelationships

public ContentletRelationships getAllRelationships(Contentlet contentlet)
                                            throws DotDataException
Description copied from interface: ContentletAPI
Returns all contentlet's relationships for a given contentlet object

Specified by:
getAllRelationships in interface ContentletAPI
Returns:
a ContentletRelationships object containing all relationships for the contentlet
Throws:
DotDataException

getBinaryFile

public java.io.File getBinaryFile(java.lang.String contentletInode,
                                  java.lang.String velocityVariableName,
                                  com.liferay.portal.model.User user)
                           throws DotDataException,
                                  DotSecurityException
Description copied from interface: ContentletAPI
Fetches the File Name stored under the contentlet and field

Specified by:
getBinaryFile in interface ContentletAPI
Returns:
fileName
Throws:
DotDataException
DotSecurityException

getContentletReferences

public java.util.List<java.util.Map<java.lang.String,java.lang.Object>> getContentletReferences(Contentlet contentlet,
                                                                                                com.liferay.portal.model.User user,
                                                                                                boolean respectFrontendRoles)
                                                                                         throws DotSecurityException,
                                                                                                DotDataException,
                                                                                                DotContentletStateException
Description copied from interface: ContentletAPI
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.

Specified by:
getContentletReferences in interface ContentletAPI
Returns:
Throws:
DotSecurityException
DotDataException
DotContentletStateException - - if teh contentlet is null or has an inode of 0

getFieldValue

public java.lang.Object getFieldValue(Contentlet contentlet,
                                      Field theField)
Description copied from interface: ContentletAPI
Gets the value of a field with a given contentlet

Specified by:
getFieldValue in interface ContentletAPI
Returns:

getName

public java.lang.String getName(Contentlet contentlet,
                                com.liferay.portal.model.User user,
                                boolean respectFrontendRoles)
                         throws DotSecurityException,
                                DotContentletStateException,
                                DotDataException
Description copied from interface: ContentletAPI
Meant to get the title or name of a contentlet

Specified by:
getName in interface ContentletAPI
Returns:
Throws:
DotSecurityException
DotContentletStateException
DotDataException

getNextReview

public java.util.Date getNextReview(Contentlet content,
                                    com.liferay.portal.model.User user,
                                    boolean respectFrontendRoles)
                             throws DotSecurityException
Description copied from interface: ContentletAPI
Finds the next date that a contentlet must be reviewed

Specified by:
getNextReview in interface ContentletAPI
Returns:
Throws:
DotSecurityException

getRelatedContent

public java.util.List<Contentlet> getRelatedContent(Contentlet contentlet,
                                                    Relationship rel,
                                                    com.liferay.portal.model.User user,
                                                    boolean respectFrontendRoles)
                                             throws DotDataException,
                                                    DotSecurityException
Description copied from interface: ContentletAPI
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

Specified by:
getRelatedContent in interface ContentletAPI
Returns:
Throws:
DotDataException
DotSecurityException

getRelatedContent

public java.util.List<Contentlet> getRelatedContent(Contentlet contentlet,
                                                    Relationship rel,
                                                    boolean pullByParent,
                                                    com.liferay.portal.model.User user,
                                                    boolean respectFrontendRoles)
                                             throws DotDataException,
                                                    DotSecurityException
Description copied from interface: ContentletAPI
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

Specified by:
getRelatedContent in interface ContentletAPI
Returns:
Throws:
DotDataException
DotSecurityException

getRelatedFiles

public java.util.List<File> getRelatedFiles(Contentlet contentlet,
                                            com.liferay.portal.model.User user,
                                            boolean respectFrontendRoles)
                                     throws DotDataException,
                                            DotSecurityException
Description copied from interface: ContentletAPI
Get all the files relates to the contentlet

Specified by:
getRelatedFiles in interface ContentletAPI
Returns:
Throws:
DotDataException
DotSecurityException

getRelatedIdentifier

public Identifier getRelatedIdentifier(Contentlet contentlet,
                                       java.lang.String relationshipType,
                                       com.liferay.portal.model.User user,
                                       boolean respectFrontendRoles)
                                throws DotDataException,
                                       DotSecurityException
Description copied from interface: ContentletAPI
Gets a file with a specific relationship type to the passed in contentlet

Specified by:
getRelatedIdentifier in interface ContentletAPI
Returns:
Throws:
DotDataException
DotSecurityException

getRelatedLinks

public java.util.List<Link> getRelatedLinks(Contentlet contentlet,
                                            com.liferay.portal.model.User user,
                                            boolean respectFrontendRoles)
                                     throws DotDataException,
                                            DotSecurityException
Description copied from interface: ContentletAPI
Gets all related links to the contentlet

Specified by:
getRelatedLinks in interface ContentletAPI
Returns:
Throws:
DotDataException
DotSecurityException

searchIndex

public java.util.List<ContentletSearch> searchIndex(java.lang.String luceneQuery,
                                                    int limit,
                                                    int offset,
                                                    java.lang.String sortBy,
                                                    com.liferay.portal.model.User user,
                                                    boolean respectFrontendRoles)
                                             throws org.apache.lucene.queryParser.ParseException,
                                                    DotSecurityException,
                                                    DotDataException
Description copied from interface: ContentletAPI
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

Specified by:
searchIndex in interface ContentletAPI
sortBy - indexName(previously known as dbColumnName) to order by. Can be null or empty string
Returns:
Throws:
org.apache.lucene.queryParser.ParseException
DotSecurityException - if user is null and respectFrontendRoles is false
DotDataException

isContentEqual

public boolean isContentEqual(Contentlet contentlet1,
                              Contentlet contentlet2,
                              com.liferay.portal.model.User user,
                              boolean respectFrontendRoles)
                       throws DotSecurityException,
                              DotDataException
Specified by:
isContentEqual in interface ContentletAPI
Returns:
Throws:
DotSecurityException
DotDataException

isContentlet

public boolean isContentlet(java.lang.String inode)
                     throws DotDataException,
                            DotRuntimeException
Description copied from interface: ContentletAPI
Use to check if the inode id is a contentlet

Specified by:
isContentlet in interface ContentletAPI
Parameters:
inode - id to check
Returns:
Throws:
DotDataException
DotRuntimeException

isFieldTypeBoolean

public boolean isFieldTypeBoolean(Field field)
Description copied from interface: ContentletAPI
Use to determine if if the field value is a Boolean value withing the contentlet object

Specified by:
isFieldTypeBoolean in interface ContentletAPI
Returns:

isFieldTypeDate

public boolean isFieldTypeDate(Field field)
Description copied from interface: ContentletAPI
Use to determine if if the field value is a Date value withing the contentlet object

Specified by:
isFieldTypeDate in interface ContentletAPI
Returns:

isFieldTypeFloat

public boolean isFieldTypeFloat(Field field)
Description copied from interface: ContentletAPI
Use to determine if if the field value is a Float value withing the contentlet object

Specified by:
isFieldTypeFloat in interface ContentletAPI
Returns:

isFieldTypeLong

public boolean isFieldTypeLong(Field field)
Description copied from interface: ContentletAPI
Use to determine if if the field value is a Long value withing the contentlet object

Specified by:
isFieldTypeLong in interface ContentletAPI
Returns:

isFieldTypeString

public boolean isFieldTypeString(Field field)
Description copied from interface: ContentletAPI
Use to determine if if the field value is a String value withing the contentlet object

Specified by:
isFieldTypeString in interface ContentletAPI
Returns:

lock

public void lock(Contentlet contentlet,
                 com.liferay.portal.model.User user,
                 boolean respectFrontendRoles)
          throws DotDataException,
                 DotSecurityException,
                 DotContentletStateException
Description copied from interface: ContentletAPI
Use to lock a contentlet

Specified by:
lock in interface ContentletAPI
Throws:
DotDataException
DotSecurityException
DotContentletStateException - - if the contentlet is null

publish

public void publish(Contentlet contentlet,
                    com.liferay.portal.model.User user,
                    boolean respectFrontendRoles)
             throws DotSecurityException,
                    DotDataException,
                    DotContentletStateException,
                    DotContentletStateException,
                    DotStateException
Description copied from interface: ContentletAPI
Publishes a piece of content.

Specified by:
publish in interface ContentletAPI
Throws:
DotSecurityException
DotDataException
DotContentletStateException
DotStateException

publish

public void publish(java.util.List<Contentlet> contentlets,
                    com.liferay.portal.model.User user,
                    boolean respectFrontendRoles)
             throws DotSecurityException,
                    DotDataException,
                    DotContentletStateException,
                    DotStateException
Description copied from interface: ContentletAPI
Publishes a piece of content.

Specified by:
publish in interface ContentletAPI
Throws:
DotSecurityException
DotDataException
DotContentletStateException
DotStateException

publishRelatedHtmlPages

public void publishRelatedHtmlPages(Contentlet contentlet)
Description copied from interface: ContentletAPI
Publishes all related HTMLPage

Specified by:
publishRelatedHtmlPages in interface ContentletAPI

reindex

public void reindex()
             throws DotReindexStateException
Description copied from interface: ContentletAPI
Reindex all content

Specified by:
reindex in interface ContentletAPI
Throws:
DotReindexStateException

reindex

public void reindex(Structure structure)
             throws DotReindexStateException
Description copied from interface: ContentletAPI
reindex content for a given structure

Specified by:
reindex in interface ContentletAPI
Throws:
DotReindexStateException

reindex

public void reindex(Contentlet contentlet)
             throws DotReindexStateException,
                    DotDataException
Description copied from interface: ContentletAPI
reindex a single content

Specified by:
reindex in interface ContentletAPI
Throws:
DotReindexStateException
DotDataException

refresh

public void refresh(Structure structure)
             throws DotReindexStateException
Description copied from interface: ContentletAPI
Reindexes content for a given structure + refreshes the content from cache

Specified by:
refresh in interface ContentletAPI
Throws:
DotReindexStateException

refresh

public void refresh(Contentlet contentlet)
             throws DotReindexStateException,
                    DotDataException
Description copied from interface: ContentletAPI
Reindexes a single content + refreshes it from cache

Specified by:
refresh in interface ContentletAPI
Throws:
DotReindexStateException
DotDataException

refreshAllContent

public void refreshAllContent()
                       throws DotReindexStateException
Description copied from interface: ContentletAPI
Reindexes all content + clear the content caches

Specified by:
refreshAllContent in interface ContentletAPI
Throws:
DotReindexStateException

refreshContentUnderHost

public void refreshContentUnderHost(Host host)
                             throws DotReindexStateException
Description copied from interface: ContentletAPI
Reindexes content under a given host + refreshes the content from cache

Specified by:
refreshContentUnderHost in interface ContentletAPI
Throws:
DotReindexStateException

relateContent

public void relateContent(Contentlet contentlet,
                          Relationship rel,
                          java.util.List<Contentlet> related,
                          com.liferay.portal.model.User user,
                          boolean respectFrontendRoles)
                   throws DotDataException,
                          DotSecurityException,
                          DotContentletStateException
Description copied from interface: ContentletAPI
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

Specified by:
relateContent in interface ContentletAPI
Throws:
DotDataException
DotSecurityException
DotContentletStateException - if one of the contentlets doesn't have passed in relationship. The method will still try to handle the other relationships

relateContent

public void relateContent(Contentlet contentlet,
                          ContentletRelationships.ContentletRelationshipRecords related,
                          com.liferay.portal.model.User user,
                          boolean respectFrontendRoles)
                   throws DotDataException,
                          DotSecurityException,
                          DotContentletStateException
Description copied from interface: ContentletAPI
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

Specified by:
relateContent in interface ContentletAPI
Throws:
DotDataException
DotSecurityException
DotContentletStateException - if one of the contentlets doesn't have passed in relationship. The method will still try to handle the other relationships

restoreVersion

public void restoreVersion(Contentlet contentlet,
                           com.liferay.portal.model.User user,
                           boolean respectFrontendRoles)
                    throws DotSecurityException,
                           DotContentletStateException,
                           DotDataException
Description copied from interface: ContentletAPI
Will make the passed in contentlet the working copy.

Specified by:
restoreVersion in interface ContentletAPI
Throws:
DotSecurityException
DotContentletStateException
DotDataException

search

public java.util.List<Contentlet> search(java.lang.String luceneQuery,
                                         int limit,
                                         int offset,
                                         java.lang.String sortBy,
                                         com.liferay.portal.model.User user,
                                         boolean respectFrontendRoles)
                                  throws DotDataException,
                                         DotSecurityException
Description copied from interface: ContentletAPI
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

Specified by:
search in interface ContentletAPI
Returns:
Throws:
DotDataException
DotSecurityException

search

public java.util.List<Contentlet> search(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
Description copied from interface: ContentletAPI
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

Specified by:
search in interface ContentletAPI
sortBy - indexName(previously known as dbColumnName) to order by. Can be null or empty string
Returns:
Throws:
DotDataException
DotSecurityException
org.apache.lucene.queryParser.ParseException

setContentletProperty

public void setContentletProperty(Contentlet contentlet,
                                  Field field,
                                  java.lang.Object value)
                           throws DotContentletStateException
Description copied from interface: ContentletAPI
Use to set contentlet properties. The value should be String, the proper type of the property

Specified by:
setContentletProperty in interface ContentletAPI
Throws:
DotContentletStateException - if the object isn't the proper type or cannot be converted to the proper type

unarchive

public void unarchive(java.util.List<Contentlet> contentlets,
                      com.liferay.portal.model.User user,
                      boolean respectFrontendRoles)
               throws DotDataException,
                      DotSecurityException,
                      DotContentletStateException
Description copied from interface: ContentletAPI
This method unarchives the given contentlets

Specified by:
unarchive in interface ContentletAPI
Throws:
DotDataException
DotSecurityException
DotContentletStateException - If one or more of the contentlets are not archived. It will unarchive all that it can though

unarchive

public void unarchive(Contentlet contentlet,
                      com.liferay.portal.model.User user,
                      boolean respectFrontendRoles)
               throws DotDataException,
                      DotSecurityException,
                      DotContentletStateException
Description copied from interface: ContentletAPI
This method unarchives the given contentlet

Specified by:
unarchive in interface ContentletAPI
Throws:
DotDataException
DotSecurityException
DotContentletStateException - if the contentlet is not archived

unlock

public void unlock(Contentlet contentlet,
                   com.liferay.portal.model.User user,
                   boolean respectFrontendRoles)
            throws DotDataException,
                   DotSecurityException
Specified by:
unlock in interface ContentletAPI
Throws:
DotDataException
DotSecurityException

unpublish

public void unpublish(Contentlet contentlet,
                      com.liferay.portal.model.User user,
                      boolean respectFrontendRoles)
               throws DotDataException,
                      DotSecurityException,
                      DotContentletStateException
Description copied from interface: ContentletAPI
This method unpublishes the given contentlet

Specified by:
unpublish in interface ContentletAPI
Throws:
DotDataException
DotSecurityException
DotContentletStateException - if the contentent cannot be unlocked by the user

unpublish

public void unpublish(java.util.List<Contentlet> contentlets,
                      com.liferay.portal.model.User user,
                      boolean respectFrontendRoles)
               throws DotDataException,
                      DotSecurityException,
                      DotContentletStateException
Description copied from interface: ContentletAPI
This method unpublishes the given contentlet

Specified by:
unpublish in interface ContentletAPI
Throws:
DotDataException
DotSecurityException
DotContentletStateException - If one or more contentlets are locked and the user is not the one who locked it. It will unpublish all that are possible though

validateContentlet

public void validateContentlet(Contentlet contentlet,
                               java.util.List<Category> cats)
                        throws DotContentletValidationException
Description copied from interface: ContentletAPI
Use to validate your contentlet.

Specified by:
validateContentlet in interface ContentletAPI
Throws:
DotContentletValidationException - will be thrown if the contentlet is not valid. Use the notValidFields property of the exception to get which fields where not valid

validateContentlet

public void validateContentlet(Contentlet contentlet,
                               java.util.Map<Relationship,java.util.List<Contentlet>> contentRelationships,
                               java.util.List<Category> cats)
                        throws DotContentletValidationException
Description copied from interface: ContentletAPI
Use to validate your contentlet.

Specified by:
validateContentlet in interface ContentletAPI
Throws:
DotContentletValidationException - will be thrown if the contentlet is not valid. Use the notValidFields property of the exception to get which fields where not valid

validateContentlet

public void validateContentlet(Contentlet contentlet,
                               ContentletRelationships contentRelationships,
                               java.util.List<Category> cats)
                        throws DotContentletValidationException
Description copied from interface: ContentletAPI
Use to validate your contentlet.

Specified by:
validateContentlet in interface ContentletAPI
Throws:
DotContentletValidationException - will be thrown if the contentlet is not valid. Use the notValidFields property of the exception to get which fields where not valid

addPreHook

public void addPreHook(java.lang.String className)
                throws java.lang.InstantiationException,
                       java.lang.IllegalAccessException,
                       java.lang.ClassNotFoundException
Description copied from interface: Interceptor
Adds a hook to the end of the chain

Specified by:
addPreHook in interface Interceptor
Throws:
java.lang.InstantiationException
java.lang.IllegalAccessException
java.lang.ClassNotFoundException

addPreHook

public void addPreHook(java.lang.Object preHook)
                throws java.lang.InstantiationException,
                       java.lang.IllegalAccessException,
                       java.lang.ClassNotFoundException
Description copied from interface: Interceptor
Adds a hook to the end of the chain

Specified by:
addPreHook in interface Interceptor
Throws:
java.lang.InstantiationException
java.lang.IllegalAccessException
java.lang.ClassNotFoundException

addPostHook

public void addPostHook(java.lang.String className,
                        int indexToAddAt)
                 throws java.lang.InstantiationException,
                        java.lang.IllegalAccessException,
                        java.lang.ClassNotFoundException
Description copied from interface: Interceptor
Adds a hook to the list at the specified index

Specified by:
addPostHook in interface Interceptor
Throws:
java.lang.InstantiationException
java.lang.IllegalAccessException
java.lang.ClassNotFoundException

addPostHook

public void addPostHook(java.lang.String className)
                 throws java.lang.InstantiationException,
                        java.lang.IllegalAccessException,
                        java.lang.ClassNotFoundException
Description copied from interface: Interceptor
Adds a hook to the end of the chain

Specified by:
addPostHook in interface Interceptor
Throws:
java.lang.InstantiationException
java.lang.IllegalAccessException
java.lang.ClassNotFoundException

addPostHook

public void addPostHook(java.lang.Object postHook)
                 throws java.lang.InstantiationException,
                        java.lang.IllegalAccessException,
                        java.lang.ClassNotFoundException
Description copied from interface: Interceptor
Adds a hook to the end of the chain

Specified by:
addPostHook in interface Interceptor
Throws:
java.lang.InstantiationException
java.lang.IllegalAccessException
java.lang.ClassNotFoundException

addPreHook

public void addPreHook(java.lang.String className,
                       int indexToAddAt)
                throws java.lang.InstantiationException,
                       java.lang.IllegalAccessException,
                       java.lang.ClassNotFoundException
Description copied from interface: Interceptor
Adds a hook to the list at the specified index

Specified by:
addPreHook in interface Interceptor
Throws:
java.lang.InstantiationException
java.lang.IllegalAccessException
java.lang.ClassNotFoundException

delPreHook

public void delPreHook(int indexToRemAt)
Description copied from interface: Interceptor
Removes a hook from the list at the specified index

Specified by:
delPreHook in interface Interceptor

delPreHook

public void delPreHook(java.lang.Object preHook)
Description copied from interface: Interceptor
Removes a given hook from the list

Specified by:
delPreHook in interface Interceptor

delPostHook

public void delPostHook(int indexToRemAt)
Description copied from interface: Interceptor
Removes a hook from the list at the specified index

Specified by:
delPostHook in interface Interceptor

delPostHook

public void delPostHook(java.lang.Object postHook)
Description copied from interface: Interceptor
Removes a given hook from the list

Specified by:
delPostHook in interface Interceptor

getPreHooks

public java.util.List<java.lang.String> getPreHooks()
Description copied from interface: Interceptor
All class names of the hooks

Specified by:
getPreHooks in interface Interceptor
Returns:

getPostHooks

public java.util.List<java.lang.String> getPostHooks()
Description copied from interface: Interceptor
All class names of the hooks

Specified by:
getPostHooks in interface Interceptor
Returns:

contentletCount

public long contentletCount()
                     throws DotDataException
Description copied from interface: ContentletAPI
gets the number of contentlets in the system. This number includes all versions not distinct identifiers

Specified by:
contentletCount in interface ContentletAPI
Returns:
Throws:
DotDataException

contentletIdentifierCount

public long contentletIdentifierCount()
                               throws DotDataException
Description copied from interface: ContentletAPI
gets the number of contentlet identifiers in the system. This number includes all versions not distinct identifiers

Specified by:
contentletIdentifierCount in interface ContentletAPI
Returns:
Throws:
DotDataException

deleteAllVersionsandBackup

public void deleteAllVersionsandBackup(java.util.List<Contentlet> contentlets,
                                       com.liferay.portal.model.User user,
                                       boolean respectFrontendRoles)
                                throws DotDataException,
                                       DotSecurityException,
                                       DotContentletStateException
Description copied from interface: ContentletAPI
This method completely deletes the given contentlet from the system and make a xml file backup

Specified by:
deleteAllVersionsandBackup in interface ContentletAPI
Throws:
DotDataException
DotSecurityException
DotContentletStateException

getSiblings

public java.util.List<Contentlet> getSiblings(java.lang.String identifier)
                                       throws DotDataException,
                                              DotSecurityException
Specified by:
getSiblings in interface ContentletAPI
Throws:
DotDataException
DotSecurityException

DBSearch

public java.util.List<java.util.Map<java.lang.String,java.io.Serializable>> DBSearch(GenericQueryFactory.Query query,
                                                                                     com.liferay.portal.model.User user,
                                                                                     boolean respectFrontendRoles)
                                                                              throws ValidationException,
                                                                                     DotDataException
Description copied from interface: ContentletAPI
Will search the DB. Use the SQLQueryBuilderFactory or GenericQueryBuiilderFactory to build your query object

Specified by:
DBSearch in interface ContentletAPI
Returns:
Throws:
ValidationException
DotDataException

copyContentlet

public Contentlet copyContentlet(Contentlet contentlet,
                                 com.liferay.portal.model.User user,
                                 boolean respectFrontendRoles)
                          throws DotDataException,
                                 DotSecurityException,
                                 DotContentletStateException
Description copied from interface: ContentletAPI
Copies a contentlet, including all its fields including binary files, image and file fields are pointers and the are preserved as the are so if source contentlet points to image A and resulting new contentlet will point to same image A as well, also copies source permissions.

Specified by:
copyContentlet in interface ContentletAPI
Returns:
Contentlet
Throws:
DotDataException
DotSecurityException
DotContentletStateException - throws this exception if the new contentlet requires a destination host or folder mandated by its structure

copyContentlet

public Contentlet copyContentlet(Contentlet contentlet,
                                 Host host,
                                 com.liferay.portal.model.User user,
                                 boolean respectFrontendRoles)
                          throws DotDataException,
                                 DotSecurityException,
                                 DotContentletStateException
Description copied from interface: ContentletAPI
Copies a contentlet, including all its fields including binary files, image and file fields are pointers and the are preserved as the are so if source contentlet points to image A and resulting new contentlet will point to same image A as well, also copies source permissions. And moves the the new piece of content to the given host

Specified by:
copyContentlet in interface ContentletAPI
Returns:
Contentlet
Throws:
DotDataException
DotSecurityException
DotContentletStateException

copyContentlet

public Contentlet copyContentlet(Contentlet contentlet,
                                 Folder folder,
                                 com.liferay.portal.model.User user,
                                 boolean respectFrontendRoles)
                          throws DotDataException,
                                 DotSecurityException,
                                 DotContentletStateException
Description copied from interface: ContentletAPI
Copies a contentlet, including all its fields including binary files, image and file fields are pointers and the are preserved as the are so if source contentlet points to image A and resulting new contentlet will point to same image A as well, also copies source permissions. And moves the the new piece of content to the given folder

Specified by:
copyContentlet in interface ContentletAPI
Returns:
Contentlet
Throws:
DotDataException
DotSecurityException
DotContentletStateException

copyContentlet

public Contentlet copyContentlet(Contentlet contentlet,
                                 Folder folder,
                                 com.liferay.portal.model.User user,
                                 boolean appendCopyToFileName,
                                 boolean respectFrontendRoles)
                          throws DotDataException,
                                 DotSecurityException,
                                 DotContentletStateException
Description copied from interface: ContentletAPI
Copies a contentlet, including all its fields including binary files, image and file fields are pointers and the are preserved as the are so if source contentlet points to image A and resulting new contentlet will point to same image A as well, also copies source permissions. And moves the the new piece of content to the given folder. appendCopyToFileName will allow to chose to append "COPY" to the file name or not.

Specified by:
copyContentlet in interface ContentletAPI
Returns:
Contentlet
Throws:
DotDataException
DotSecurityException
DotContentletStateException

isInodeIndexed

public boolean isInodeIndexed(java.lang.String inode)
Description copied from interface: ContentletAPI
Method will time out after 30 seconds returning false

Specified by:
isInodeIndexed in interface ContentletAPI
Returns:

isInodeIndexed

public boolean isInodeIndexed(java.lang.String inode,
                              boolean live)
Description copied from interface: ContentletAPI
this version optionaly adds a +live:true to the search if parameter live is true.

Specified by:
isInodeIndexed in interface ContentletAPI
Returns:

isInodeIndexed

public boolean isInodeIndexed(java.lang.String inode,
                              int secondsToWait)
Description copied from interface: ContentletAPI
Method will time out after 30 seconds returning false

Specified by:
isInodeIndexed in interface ContentletAPI
secondsToWait - - how long to wait before timing out
Returns:

UpdateContentWithSystemHost

public void UpdateContentWithSystemHost(java.lang.String hostIdentifier)
                                 throws DotDataException,
                                        DotSecurityException
Description copied from interface: ContentletAPI
Method will update hostInode of content to systemhost

Specified by:
UpdateContentWithSystemHost in interface ContentletAPI
Throws:
DotSecurityException
DotDataException

removeUserReferences

public void removeUserReferences(java.lang.String userId)
                          throws DotDataException,
                                 DotSecurityException
Description copied from interface: ContentletAPI
Method will remove User References of the given userId in Contentlet

Specified by:
removeUserReferences in interface ContentletAPI
Throws:
DotSecurityException
DotDataException

getUrlMapForContentlet

public java.lang.String getUrlMapForContentlet(Contentlet contentlet,
                                               com.liferay.portal.model.User user,
                                               boolean respectFrontendRoles)
                                        throws DotSecurityException,
                                               DotDataException
Description copied from interface: ContentletAPI
Return the URL Map for the specified content if the structure associated to the content has the URL Map Pattern set.

Specified by:
getUrlMapForContentlet in interface ContentletAPI
Returns:
String with the URL Map. Null if the structure of the content doesn't have the URL Map Pattern set.
Throws:
DotSecurityException
DotDataException

deleteVersion

public void deleteVersion(Contentlet contentlet,
                          com.liferay.portal.model.User user,
                          boolean respectFrontendRoles)
                   throws DotDataException,
                          DotSecurityException
Description copied from interface: ContentletAPI
Deletes the given version of the contentlet from the system

Specified by:
deleteVersion in interface ContentletAPI
Throws:
DotDataException
DotSecurityException

saveDraft

public Contentlet 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
Description copied from interface: ContentletAPI
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

Specified by:
saveDraft in interface ContentletAPI
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
Throws:
java.lang.IllegalArgumentException
DotDataException
DotSecurityException
DotContentletStateException - If inode null
DotContentletValidationException - If content is not valid

searchByIdentifier

public java.util.List<Contentlet> 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
Description copied from interface: ContentletAPI
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

Specified by:
searchByIdentifier in interface ContentletAPI
Returns:
Throws:
DotDataException
DotSecurityException
org.apache.lucene.queryParser.ParseException

searchByIdentifier

public java.util.List<Contentlet> 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
Description copied from interface: ContentletAPI
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

Specified by:
searchByIdentifier in interface ContentletAPI
sortBy - indexName(previously known as dbColumnName) to order by. Can be null or empty string
Returns:
Throws:
DotDataException
DotSecurityException
org.apache.lucene.queryParser.ParseException

searchByIdentifier

public java.util.List<Contentlet> 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
Description copied from interface: ContentletAPI
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.

Specified by:
searchByIdentifier in interface ContentletAPI
sortBy - indexName(previously known as dbColumnName) to order by. Can be null or empty string
Returns:
Throws:
DotDataException
DotSecurityException
org.apache.lucene.queryParser.ParseException

refreshContentUnderFolder

public void refreshContentUnderFolder(Folder folder)
                               throws DotReindexStateException
Description copied from interface: ContentletAPI
Reindexes content under a given folder + refreshes the content from cache

Specified by:
refreshContentUnderFolder in interface ContentletAPI
Throws:
DotReindexStateException

removeFolderReferences

public void removeFolderReferences(Folder folder)
                            throws DotDataException,
                                   DotSecurityException
Description copied from interface: ContentletAPI
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

Specified by:
removeFolderReferences in interface ContentletAPI
Throws:
DotDataException
DotSecurityException

canLock

public boolean canLock(Contentlet contentlet,
                       com.liferay.portal.model.User user)
                throws DotLockException
Description copied from interface: ContentletAPI
Tests whether a user can potentially lock a piece of content (needed to test before publish, etc). This method will return false if content is already locked by another user.

Specified by:
canLock in interface ContentletAPI
Returns:
Throws:
DotLockException

findContentRelationships

public java.util.Map<Relationship,java.util.List<Contentlet>> findContentRelationships(Contentlet contentlet,
                                                                                       com.liferay.portal.model.User user)
                                                                                throws DotDataException,
                                                                                       DotSecurityException
Description copied from interface: ContentletAPI
Returns the ContentRelationships Map for the specified content.

Specified by:
findContentRelationships in interface ContentletAPI
Returns:
Map with the ContentRelationships. Empty Map if the content doesn't have associated relationships.
Throws:
DotDataException
DotSecurityException

loadField

public java.lang.Object loadField(java.lang.String inode,
                                  Field field)
                           throws DotDataException
Description copied from interface: ContentletAPI
Reads the field from storage. It is useful to implement lazy loading.

Specified by:
loadField in interface ContentletAPI
Throws:
DotDataException

indexCount

public long indexCount(java.lang.String luceneQuery,
                       com.liferay.portal.model.User user,
                       boolean respectFrontendRoles)
                throws DotDataException,
                       DotSecurityException
Description copied from interface: ContentletAPI
Allows to count how many records match the specified lucene query and user

Specified by:
indexCount in interface ContentletAPI
Returns:
Throws:
DotDataException
DotSecurityException

getMostViewedContent

public java.util.List<java.util.Map<java.lang.String,java.lang.String>> getMostViewedContent(java.lang.String structureVariableName,
                                                                                             java.lang.String startDate,
                                                                                             java.lang.String endDate,
                                                                                             com.liferay.portal.model.User user)
Description copied from interface: ContentletAPI
Gets the top viewed contents identifiers and numberOfViews for a particular structure for a specified date interval

Specified by:
getMostViewedContent in interface ContentletAPI
Returns:


Copyright © 2013 dotCMS Inc. All Rights Reserved.