public class ManageViewServiceImpl extends Object implements ManageViewService, org.picocontainer.Startable
| Modifier and Type | Field and Description |
|---|---|
protected static String |
ADMIN_VIEW |
protected static String |
BUTTON_PROP |
protected static String |
DEFAULT_VIEW |
protected static String |
EXO_HIDE_EXPLORER_PANEL |
protected static String |
EXO_PERMISSIONS |
protected static String |
EXO_TEMPLATE |
EXTENSION_TYPE| Constructor and Description |
|---|
ManageViewServiceImpl(org.exoplatform.services.jcr.RepositoryService jcrService,
org.exoplatform.services.jcr.ext.hierarchy.NodeHierarchyCreator nodeHierarchyCreator,
DMSConfiguration dmsConfiguration,
org.exoplatform.webui.ext.UIExtensionManager extensionManager)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
addTab(javax.jcr.Node view,
String name,
String buttons)
Adds a new tab to the given view.
|
String |
addTemplate(String name,
String content,
String homeTemplate)
Adds a new template to a place with the given path.
|
String |
addTemplate(String name,
String content,
String homeTemplate,
org.exoplatform.services.jcr.ext.common.SessionProvider provider)
Adds a new template to a place with the given path.
|
void |
addView(String name,
String permissions,
boolean hideExplorerPanel,
String template,
List<?> tabs)
Adds a new view to the system by giving the following params.
|
void |
addView(String name,
String permissions,
String template,
List<?> tabs)
Adds a new view to the system by giving the following params.
|
List<javax.jcr.Node> |
getAllTemplates(String homeAlias,
org.exoplatform.services.jcr.ext.common.SessionProvider provider)
Gets all templates.
|
List<ViewConfig> |
getAllViews()
Gets all views.
|
List<?> |
getButtons()
Gets all strings of buttons.
|
Set<String> |
getConfiguredTemplates()
Gets all configured templates.
|
Set<String> |
getConfiguredViews()
Gets all configured views.
|
javax.jcr.Node |
getTemplate(String path,
org.exoplatform.services.jcr.ext.common.SessionProvider provider)
Gets a template by a given path.
|
javax.jcr.Node |
getTemplateHome(String homeAlias,
org.exoplatform.services.jcr.ext.common.SessionProvider provider)
Gets the template home that contains all templates.
|
javax.jcr.Node |
getViewByName(String name,
org.exoplatform.services.jcr.ext.common.SessionProvider provider)
Gets a view by its name.
|
javax.jcr.Node |
getViewHome() |
boolean |
hasView(String name)
Checks if a given view exists.
|
void |
init()
Initializes all templates that are set in the configuration file.
|
void |
removeTemplate(String templatePath)
Removes a template by a given path.
|
void |
removeTemplate(String templatePath,
org.exoplatform.services.jcr.ext.common.SessionProvider provider)
Removes a template by a given path.
|
void |
removeView(String viewName)
Removes a view from the views list in the system.
|
void |
setManageViewPlugin(ManageViewPlugin viewPlugin) |
void |
start() |
void |
stop() |
String |
updateTemplate(String name,
String content,
String homeTemplate)
Updates a template at the given path.
|
String |
updateTemplate(String name,
String content,
String homeTemplate,
org.exoplatform.services.jcr.ext.common.SessionProvider provider)
Updates a template at the given path.
|
protected static final String EXO_TEMPLATE
protected static final String ADMIN_VIEW
protected static final String DEFAULT_VIEW
protected static final String EXO_PERMISSIONS
protected static final String EXO_HIDE_EXPLORER_PANEL
protected static final String BUTTON_PROP
public ManageViewServiceImpl(org.exoplatform.services.jcr.RepositoryService jcrService,
org.exoplatform.services.jcr.ext.hierarchy.NodeHierarchyCreator nodeHierarchyCreator,
DMSConfiguration dmsConfiguration,
org.exoplatform.webui.ext.UIExtensionManager extensionManager)
throws Exception
jcrService - : Manage repositorynodeHierarchyCreator - : Manage alias pathdmsConfiguration - : Manage dms-system workspaceextensionManager - : Manage UIComponent in each viewExceptionpublic void start()
start in interface org.picocontainer.Startablepublic void stop()
stop in interface org.picocontainer.Startablepublic void init()
throws Exception
init in interface ManageViewServiceException - The exceptionpublic void setManageViewPlugin(ManageViewPlugin viewPlugin)
public List<?> getButtons()
getButtons in interface ManageViewServicepublic List<ViewConfig> getAllViews() throws Exception
getAllViews in interface ManageViewServiceException - The exceptionpublic boolean hasView(String name) throws Exception
hasView in interface ManageViewServicename - Name of the given view.Exception - The exceptionpublic javax.jcr.Node getViewByName(String name, org.exoplatform.services.jcr.ext.common.SessionProvider provider) throws Exception
getViewByName in interface ManageViewServicename - Name of the view.provider - The session provider.Exception - The exceptionpublic void addView(String name, String permissions, String template, List<?> tabs) throws Exception
addView in interface ManageViewServicename - Name of the view.permissions - Who can access the view.template - Name of the templated used by the added view.tabs - Tabs of the added view.Exception - The exceptionpublic void addView(String name, String permissions, boolean hideExplorerPanel, String template, List<?> tabs) throws Exception
addView in interface ManageViewServicename - Name of the view.permissions - Who can access the view.hideExplorerPanel - If "true", the explorer panel is hidden. If "false", the explorer panel is shown.template - Name of the templated used by the added view.tabs - Tabs of the added view.Exception - The exceptionpublic void removeView(String viewName) throws Exception
removeView in interface ManageViewServiceviewName - Name of the removed view.Exception - The exceptionpublic void addTab(javax.jcr.Node view,
String name,
String buttons)
throws Exception
addTab in interface ManageViewServiceview - The given view.name - Name of the added tab.buttons - Buttons of the added tab.Exception - The exceptionpublic javax.jcr.Node getTemplateHome(String homeAlias, org.exoplatform.services.jcr.ext.common.SessionProvider provider) throws Exception
getTemplateHome in interface ManageViewServicehomeAlias - Alias of the template home.provider - The session provider.Exception - The exceptionpublic List<javax.jcr.Node> getAllTemplates(String homeAlias, org.exoplatform.services.jcr.ext.common.SessionProvider provider) throws Exception
getAllTemplates in interface ManageViewServicehomeAlias - Alias of the template home.provider - The session provider.Exception - The exceptionpublic javax.jcr.Node getTemplate(String path, org.exoplatform.services.jcr.ext.common.SessionProvider provider) throws Exception
getTemplate in interface ManageViewServicepath - The given path.provider - The session provider.Exception - The exceptionpublic String addTemplate(String name, String content, String homeTemplate) throws Exception
addTemplate in interface ManageViewServicename - Name of the new template.content - Content of the template.homeTemplate - The given path.Exception - The exceptionpublic String addTemplate(String name, String content, String homeTemplate, org.exoplatform.services.jcr.ext.common.SessionProvider provider) throws Exception
addTemplate in interface ManageViewServicename - Name of the new template.content - Content of the template.homeTemplate - The given path.provider - The session provider.Exception - The exceptionpublic String updateTemplate(String name, String content, String homeTemplate) throws Exception
updateTemplate in interface ManageViewServicename - Name of the updated template.content - Content of the template.homeTemplate - The given path.Exception - The exceptionpublic String updateTemplate(String name, String content, String homeTemplate, org.exoplatform.services.jcr.ext.common.SessionProvider provider) throws Exception
updateTemplate in interface ManageViewServicename - Name of the updated template.content - Content of the template.homeTemplate - The given path.provider - The session provider.Exception - The exceptionpublic void removeTemplate(String templatePath) throws Exception
removeTemplate in interface ManageViewServicetemplatePath - The template path.Exception - The exceptionpublic void removeTemplate(String templatePath, org.exoplatform.services.jcr.ext.common.SessionProvider provider) throws Exception
removeTemplate in interface ManageViewServicetemplatePath - The template path.provider - The session provider.Exception - The exceptionpublic Set<String> getConfiguredTemplates()
ManageViewServicegetConfiguredTemplates in interface ManageViewServicepublic Set<String> getConfiguredViews()
ManageViewServicegetConfiguredViews in interface ManageViewServiceCopyright © 2003–2019 eXo Platform SAS. All rights reserved.