org.exoplatform.clouddrive.ecms
Class CloudDriveUIService

java.lang.Object
  extended by org.exoplatform.clouddrive.ecms.CloudDriveUIService
All Implemented Interfaces:
org.picocontainer.Startable

public class CloudDriveUIService
extends Object
implements org.picocontainer.Startable

Add ImportCloudDocument button in ListView. We're doing this by hack of already stored DMS navigation.


Field Summary
static String CONNECT_CLOUD_DRIVE_ACTION
           
protected  Set<String> defaultMenuActions
           
protected static String DMS_SYSTEM_WORKSPACE
           
protected  org.exoplatform.clouddrive.CloudDriveService driveService
           
protected static String ECD_BUTTONS
           
protected static String ECD_USER_BUTTONS
           
protected static String EXO_BUTTONS
           
protected  org.exoplatform.services.jcr.RepositoryService jcrService
           
protected  org.exoplatform.services.cms.views.ManageViewService manageView
           
protected  org.exoplatform.webui.ext.UIExtensionManager uiExtensions
           
protected  List<String> VIEWS
           
 
Constructor Summary
CloudDriveUIService(org.exoplatform.services.jcr.RepositoryService repoService, org.exoplatform.clouddrive.CloudDriveService driveService, org.exoplatform.webui.ext.UIExtensionManager uiExtensions, org.exoplatform.services.cms.views.ManageViewService manageView)
           
 
Method Summary
 void addPlugin(org.exoplatform.container.component.ComponentPlugin plugin)
           
protected  String capitalize(String text)
           
protected  List<String> getAllActions()
          All Cloud Drive actions registered in the system.
protected  List<String> getDefaultActions()
          List of Cloud Drive actions configured to apper in menu by default.
protected  void prepareViews()
          Add Cloud Drive actions to ECMS actions menu if they are not already there.
protected  void readViewActions(javax.jcr.Node node, String buttons, StringBuilder actionsStr)
          Read all buttons actions from given node, in buttons property, to given string builder.
protected  void restoreViews()
          Remove Cloud Drive actions from ECMS actions menu and store them in dedicated property.
protected  void splitViewActions(javax.jcr.Node node, String buttons, StringBuilder cdActions, StringBuilder otherActions)
          Split buttons actions on Cloud Drive's and other from given node, in buttons property, to given string builder.
 void start()
           
 void stop()
           
protected  String uncapitalize(String text)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DMS_SYSTEM_WORKSPACE

protected static final String DMS_SYSTEM_WORKSPACE
See Also:
Constant Field Values

EXO_BUTTONS

protected static final String EXO_BUTTONS
See Also:
Constant Field Values

ECD_USER_BUTTONS

protected static final String ECD_USER_BUTTONS
See Also:
Constant Field Values

ECD_BUTTONS

protected static final String ECD_BUTTONS
See Also:
Constant Field Values

CONNECT_CLOUD_DRIVE_ACTION

public static final String CONNECT_CLOUD_DRIVE_ACTION
See Also:
Constant Field Values

jcrService

protected final org.exoplatform.services.jcr.RepositoryService jcrService

manageView

protected final org.exoplatform.services.cms.views.ManageViewService manageView

driveService

protected final org.exoplatform.clouddrive.CloudDriveService driveService

uiExtensions

protected final org.exoplatform.webui.ext.UIExtensionManager uiExtensions

defaultMenuActions

protected final Set<String> defaultMenuActions

VIEWS

protected final List<String> VIEWS
Constructor Detail

CloudDriveUIService

public CloudDriveUIService(org.exoplatform.services.jcr.RepositoryService repoService,
                           org.exoplatform.clouddrive.CloudDriveService driveService,
                           org.exoplatform.webui.ext.UIExtensionManager uiExtensions,
                           org.exoplatform.services.cms.views.ManageViewService manageView)
Method Detail

addPlugin

public void addPlugin(org.exoplatform.container.component.ComponentPlugin plugin)

getDefaultActions

protected List<String> getDefaultActions()
                                  throws Exception
List of Cloud Drive actions configured to apper in menu by default.

Returns:
List of Strings with action names
Throws:
Exception

getAllActions

protected List<String> getAllActions()
                              throws Exception
All Cloud Drive actions registered in the system.

Returns:
List of Strings with action names
Throws:
Exception

readViewActions

protected void readViewActions(javax.jcr.Node node,
                               String buttons,
                               StringBuilder actionsStr)
                        throws javax.jcr.RepositoryException
Read all buttons actions from given node, in buttons property, to given string builder.

Parameters:
node - Node
buttons - String
actionsStr - StringBuilder
Throws:
javax.jcr.RepositoryException

splitViewActions

protected void splitViewActions(javax.jcr.Node node,
                                String buttons,
                                StringBuilder cdActions,
                                StringBuilder otherActions)
                         throws javax.jcr.RepositoryException
Split buttons actions on Cloud Drive's and other from given node, in buttons property, to given string builder.

Parameters:
node - Node
buttons - String
actionsStr - StringBuilder
Throws:
javax.jcr.RepositoryException

prepareViews

protected void prepareViews()
                     throws Exception
Add Cloud Drive actions to ECMS actions menu if they are not already there. This method adds Cloud Drive actions saved in previous container execution (saved on container stop, see restoreViews() ). If no saved actions, then defaults will be added from configuration.

Throws:
Exception

restoreViews

protected void restoreViews()
                     throws Exception
Remove Cloud Drive actions from ECMS actions menu and store them in dedicated property. We remove actions to make the add-on uninstallation safe (don't leave our menu actions in the content).

Throws:
Exception

capitalize

protected String capitalize(String text)

uncapitalize

protected String uncapitalize(String text)

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 © 2003–2015 eXo Platform SAS. All rights reserved.