com.dotmarketing.portlets.containers.business
Class ContainerAPIImpl

java.lang.Object
  extended by com.dotmarketing.business.BaseInodeAPI
      extended by com.dotmarketing.business.BaseWebAssetAPI
          extended by com.dotmarketing.portlets.containers.business.ContainerAPIImpl
All Implemented Interfaces:
ContainerAPI

public class ContainerAPIImpl
extends BaseWebAssetAPI
implements ContainerAPI


Field Summary
protected  ContainerFactory containerFactory
           
protected  HostAPI hostAPI
           
protected  PermissionAPI permissionAPI
           
 
Constructor Summary
ContainerAPIImpl()
           
 
Method Summary
 Container copy(Container source, Host destination, com.liferay.portal.model.User user, boolean respectFrontendRoles)
          Copies container to the specified host
 boolean delete(Container container, com.liferay.portal.model.User user, boolean respectFrontendRoles)
          Delete the specified container
 int deleteOldVersions(java.util.Date assetsOlderThan)
           
 java.util.List<Container> findAllContainers(com.liferay.portal.model.User user, boolean respectFrontendRoles)
          Retrieves the list of all containers in the system
 java.util.List<Container> findContainers(com.liferay.portal.model.User user, boolean includeArchived, java.util.Map<java.lang.String,java.lang.Object> params, java.lang.String hostId, java.lang.String inode, java.lang.String identifier, java.lang.String parent, int offset, int limit, java.lang.String orderBy)
          Retrieves a paginated list of containers the user can use
 java.util.List<Container> findContainersForStructure(java.lang.String structureInode)
          Retrieves containers using the specified structure
 java.util.List<Container> findContainersUnder(Host parentPermissionable)
          Retrieves all the containers attached to the given host
 java.util.List<Container> getContainersInTemplate(Template parentTemplate)
          Retrieves the children working containers attached to the given template
 Container getLiveContainerById(java.lang.String id, com.liferay.portal.model.User user, boolean respectFrontendRoles)
          Returns the live container by the id
 Host getParentHost(Container cont, com.liferay.portal.model.User user, boolean respectFrontendRoles)
          Retrieves the parent host of a container
 Container getWorkingContainerById(java.lang.String id, com.liferay.portal.model.User user, boolean respectFrontendRoles)
          Returns the working container by the id
 Container save(Container container, Structure structure, Host host, com.liferay.portal.model.User user, boolean respectFrontendRoles)
          Save container
protected  void save(WebAsset webAsset)
          Save the asset.
protected  void save(WebAsset webAsset, java.lang.String existingId)
           
 
Methods inherited from class com.dotmarketing.business.BaseWebAssetAPI
createAsset, createAsset, createAsset, createAsset, deleteAsset, deleteOldVersions, getCountAssetsAndPermissionsPerRoleAndConditionWithParent, getCountAssetsAndPermissionsPerRoleAndConditionWithParent, getCountAssetsPerConditionWithPermission, getCountAssetsPerConditionWithPermission, getCountAssetsPerConditionWithPermission, getCountAssetsPerConditionWithPermission, getCountAssetsPerConditionWithPermission, getCountAssetsPerConditionWithPermission, isAbstractAsset, saveAsset, unLockAsset
 
Methods inherited from class com.dotmarketing.business.BaseInodeAPI
saveInode
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

permissionAPI

protected PermissionAPI permissionAPI

containerFactory

protected ContainerFactory containerFactory

hostAPI

protected HostAPI hostAPI
Constructor Detail

ContainerAPIImpl

public ContainerAPIImpl()
Method Detail

copy

public Container copy(Container source,
                      Host destination,
                      com.liferay.portal.model.User user,
                      boolean respectFrontendRoles)
               throws DotDataException,
                      DotSecurityException
Description copied from interface: ContainerAPI
Copies container to the specified host

Specified by:
copy in interface ContainerAPI
Returns:
Container
Throws:
DotDataException
DotSecurityException

save

protected void save(WebAsset webAsset)
             throws DotDataException
Description copied from class: BaseWebAssetAPI
Save the asset.

Specified by:
save in class BaseWebAssetAPI
Throws:
DotDataException

save

protected void save(WebAsset webAsset,
                    java.lang.String existingId)
             throws DotDataException
Throws:
DotDataException

getWorkingContainerById

public Container getWorkingContainerById(java.lang.String id,
                                         com.liferay.portal.model.User user,
                                         boolean respectFrontendRoles)
                                  throws DotDataException,
                                         DotSecurityException
Description copied from interface: ContainerAPI
Returns the working container by the id

Specified by:
getWorkingContainerById in interface ContainerAPI
Returns:
Container
Throws:
DotDataException
DotSecurityException

getLiveContainerById

public Container getLiveContainerById(java.lang.String id,
                                      com.liferay.portal.model.User user,
                                      boolean respectFrontendRoles)
                               throws DotDataException,
                                      DotSecurityException
Description copied from interface: ContainerAPI
Returns the live container by the id

Specified by:
getLiveContainerById in interface ContainerAPI
Returns:
Container
Throws:
DotDataException
DotSecurityException

getContainersInTemplate

public java.util.List<Container> getContainersInTemplate(Template parentTemplate)
                                                  throws DotStateException,
                                                         DotDataException,
                                                         DotSecurityException
Retrieves the children working containers attached to the given template

Specified by:
getContainersInTemplate in interface ContainerAPI
Parameters:
parentTemplate -
Returns:
Throws:
DotSecurityException
DotDataException
DotStateException
DotHibernateException

findContainersUnder

public java.util.List<Container> findContainersUnder(Host parentPermissionable)
                                              throws DotDataException
Retrieves all the containers attached to the given host

Specified by:
findContainersUnder in interface ContainerAPI
Parameters:
parentPermissionable -
Returns:
Throws:
DotDataException

save

public Container save(Container container,
                      Structure structure,
                      Host host,
                      com.liferay.portal.model.User user,
                      boolean respectFrontendRoles)
               throws DotDataException,
                      DotSecurityException
Description copied from interface: ContainerAPI
Save container

Specified by:
save in interface ContainerAPI
Returns:
Container
Throws:
DotDataException
DotSecurityException

delete

public boolean delete(Container container,
                      com.liferay.portal.model.User user,
                      boolean respectFrontendRoles)
               throws DotSecurityException,
                      DotDataException
Description copied from interface: ContainerAPI
Delete the specified container

Specified by:
delete in interface ContainerAPI
Returns:
boolean
Throws:
DotSecurityException
DotDataException

findAllContainers

public java.util.List<Container> findAllContainers(com.liferay.portal.model.User user,
                                                   boolean respectFrontendRoles)
                                            throws DotDataException,
                                                   DotSecurityException
Description copied from interface: ContainerAPI
Retrieves the list of all containers in the system

Specified by:
findAllContainers in interface ContainerAPI
Returns:
Throws:
DotDataException
DotSecurityException

getParentHost

public Host getParentHost(Container cont,
                          com.liferay.portal.model.User user,
                          boolean respectFrontendRoles)
                   throws DotDataException,
                          DotSecurityException
Description copied from interface: ContainerAPI
Retrieves the parent host of a container

Specified by:
getParentHost in interface ContainerAPI
Throws:
DotSecurityException
DotDataException

findContainers

public java.util.List<Container> findContainers(com.liferay.portal.model.User user,
                                                boolean includeArchived,
                                                java.util.Map<java.lang.String,java.lang.Object> params,
                                                java.lang.String hostId,
                                                java.lang.String inode,
                                                java.lang.String identifier,
                                                java.lang.String parent,
                                                int offset,
                                                int limit,
                                                java.lang.String orderBy)
                                         throws DotSecurityException,
                                                DotDataException
Description copied from interface: ContainerAPI
Retrieves a paginated list of containers the user can use

Specified by:
findContainers in interface ContainerAPI
Returns:
Throws:
DotSecurityException
DotDataException

findContainersForStructure

public java.util.List<Container> findContainersForStructure(java.lang.String structureInode)
                                                     throws DotDataException
Description copied from interface: ContainerAPI
Retrieves containers using the specified structure

Specified by:
findContainersForStructure in interface ContainerAPI
Returns:
Throws:
DotDataException

deleteOldVersions

public int deleteOldVersions(java.util.Date assetsOlderThan)
                      throws DotStateException,
                             DotDataException
Specified by:
deleteOldVersions in interface ContainerAPI
Throws:
DotStateException
DotDataException


Copyright © 2013 dotCMS Inc. All Rights Reserved.