org.exoplatform.services.wcm.publication
Class WCMComposerImpl

java.lang.Object
  extended by org.exoplatform.services.wcm.publication.WCMComposerImpl
All Implemented Interfaces:
WCMComposer, org.picocontainer.Startable

public class WCMComposerImpl
extends java.lang.Object
implements WCMComposer, org.picocontainer.Startable

The Class WCMComposerImpl.

Author:
benjamin

Field Summary
 
Fields inherited from interface org.exoplatform.services.wcm.publication.WCMComposer
BASE_VERSION, FILTER_MODE, FILTER_ORDER_BY, FILTER_ORDER_TYPE, FILTER_PRIMARY_TYPE, FILTER_RECURSIVE, FILTER_REMOTE_USER, FILTER_SITE_NAME, FILTER_STATE, FILTER_VERSION, IS_RECURSIVE, MODE_EDIT, MODE_LIVE
 
Constructor Summary
WCMComposerImpl(org.exoplatform.container.xml.InitParams params)
          Instantiates a new WCM composer impl.
 
Method Summary
 java.util.List<java.lang.String> getAllowedStates(java.lang.String mode)
          We currently support 2 modes : MODE_LIVE : PUBLISHED state only MODE_EDIT : PUBLISHED, DRAFT, PENDING, STAGED, APPROVED allowed.
 java.util.List<javax.jcr.Node> getCategories(javax.jcr.Node node, java.lang.String repository)
           
 javax.jcr.Node getContent(java.lang.String repository, java.lang.String workspace, java.lang.String nodeIdentifier, java.util.HashMap<java.lang.String,java.lang.String> filters, org.exoplatform.services.jcr.ext.common.SessionProvider sessionProvider)
          returns content at the specified path based on filters.
 java.util.List<javax.jcr.Node> getContents(java.lang.String repository, java.lang.String workspace, java.lang.String path, java.util.HashMap<java.lang.String,java.lang.String> filters, org.exoplatform.services.jcr.ext.common.SessionProvider sessionProvider)
          returns contents at the specified path based on filters.
 void start()
           
 void stop()
           
 boolean updateContent(java.lang.String repository, java.lang.String workspace, java.lang.String path, java.util.HashMap<java.lang.String,java.lang.String> filters)
          Update content.
 boolean updateContents(java.lang.String repository, java.lang.String workspace, java.lang.String path, java.util.HashMap<java.lang.String,java.lang.String> filters)
          Update contents.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WCMComposerImpl

public WCMComposerImpl(org.exoplatform.container.xml.InitParams params)
                throws java.lang.Exception
Instantiates a new WCM composer impl.

Parameters:
templateService - the template service
publicationService - the publication service
Throws:
java.lang.Exception - the exception
Method Detail

getContent

public javax.jcr.Node getContent(java.lang.String repository,
                                 java.lang.String workspace,
                                 java.lang.String nodeIdentifier,
                                 java.util.HashMap<java.lang.String,java.lang.String> filters,
                                 org.exoplatform.services.jcr.ext.common.SessionProvider sessionProvider)
                          throws java.lang.Exception
Description copied from interface: WCMComposer
returns content at the specified path based on filters.

Specified by:
getContent in interface WCMComposer
Parameters:
repository - the repository
workspace - the workspace
filters - the filters
sessionProvider - the session provider
Returns:
a jcr node
Throws:
java.lang.Exception - the exception

getContents

public java.util.List<javax.jcr.Node> getContents(java.lang.String repository,
                                                  java.lang.String workspace,
                                                  java.lang.String path,
                                                  java.util.HashMap<java.lang.String,java.lang.String> filters,
                                                  org.exoplatform.services.jcr.ext.common.SessionProvider sessionProvider)
                                           throws java.lang.Exception
Description copied from interface: WCMComposer
returns contents at the specified path based on filters.

Specified by:
getContents in interface WCMComposer
Parameters:
repository - the repository
workspace - the workspace
path - the path
filters - the filters
sessionProvider - the session provider
Returns:
a jcr node
Throws:
java.lang.Exception - the exception

updateContent

public boolean updateContent(java.lang.String repository,
                             java.lang.String workspace,
                             java.lang.String path,
                             java.util.HashMap<java.lang.String,java.lang.String> filters)
                      throws java.lang.Exception
Description copied from interface: WCMComposer
Update content.

Specified by:
updateContent in interface WCMComposer
Parameters:
repository - the repository
workspace - the workspace
filters - the filters
Returns:
true, if successful
Throws:
java.lang.Exception

getCategories

public java.util.List<javax.jcr.Node> getCategories(javax.jcr.Node node,
                                                    java.lang.String repository)
                                             throws java.lang.Exception
Throws:
java.lang.Exception

updateContents

public boolean updateContents(java.lang.String repository,
                              java.lang.String workspace,
                              java.lang.String path,
                              java.util.HashMap<java.lang.String,java.lang.String> filters)
                       throws java.lang.Exception
Description copied from interface: WCMComposer
Update contents.

Specified by:
updateContents in interface WCMComposer
Parameters:
repository - the repository
workspace - the workspace
path - the path
filters - the filters
Returns:
true, if successful
Throws:
java.lang.Exception

getAllowedStates

public java.util.List<java.lang.String> getAllowedStates(java.lang.String mode)
We currently support 2 modes : MODE_LIVE : PUBLISHED state only MODE_EDIT : PUBLISHED, DRAFT, PENDING, STAGED, APPROVED allowed.

Specified by:
getAllowedStates in interface WCMComposer
Parameters:
mode - the current mode (MODE_LIVE or MODE_EDIT)
Returns:
the allowed states

start

public void start()
Specified by:
start in interface org.picocontainer.Startable

stop

public void stop()
Specified by:
stop in interface org.picocontainer.Startable


Copyright © 2011 eXo Platform SAS. All Rights Reserved.