public class MetadataServiceImpl extends Object implements MetadataService, org.picocontainer.Startable
| Modifier and Type | Field and Description |
|---|---|
static String |
DIALOG1
Node name DIALOG1
|
static String |
DIALOGS
Node name DIALOGS
|
static String |
INTERNAL_USE
Property name INTERNAL_USE
|
static String |
METADATA_TYPE
NodeType METADATA_TYPE
|
static String |
NT_UNSTRUCTURED
NodeType NT_UNSTRUCTURED
|
static String |
VIEW1
Node name VIEW1
|
static String |
VIEWS
Node name VIEWS
|
| Constructor and Description |
|---|
MetadataServiceImpl(org.exoplatform.services.jcr.ext.hierarchy.NodeHierarchyCreator nodeHierarchyCreator,
org.exoplatform.services.jcr.RepositoryService repositoryService,
DMSConfiguration dmsConfiguration)
Constructor method
|
| Modifier and Type | Method and Description |
|---|---|
String |
addMetadata(String nodetype,
boolean isDialog,
String role,
String content,
boolean isAddNew)
Add new nodetype and set property EXO_ROLES_PROP, EXO_TEMPLATE_FILE_PROP
for dialog template node or view template node if node doesn't exist
Set property EXO_ROLES_PROP, EXO_TEMPLATE_FILE_PROP
for dialog template node or view template node if node exists
|
String |
addMetadata(String nodetype,
boolean isDialog,
String role,
String content,
String label,
boolean isAddNew)
Add new nodetype and set property EXO_ROLES_PROP, EXO_TEMPLATE_FILE_PROP
for dialog template node or view template node if node doesn't exist
Set property EXO_ROLES_PROP, EXO_TEMPLATE_FILE_PROP
for dialog template node or view template node if node exists
|
void |
addPlugins(org.exoplatform.container.component.ComponentPlugin plugin)
Add TemplatePlugin
|
List<javax.jcr.nodetype.NodeType> |
getAllMetadatasNodeType()
Get all NodeType in current repository with NodeType = exo:metadata
|
List<String> |
getExternalMetadataType()
Get all NodeType name that contains property that is not autocreated
and name of NodeType differs from exo:metadata
|
javax.jcr.Node |
getMetadata(String metaName)
Get the metadata node based on its name
|
String |
getMetadataLabel(String metaName)
Get metadata label based on its name
|
List<String> |
getMetadataList()
Get name of all NodeType in current repository
|
String |
getMetadataPath(String name,
boolean isDialog)
Get path to dialog template or view tempate node
|
String |
getMetadataRoles(String name,
boolean isDialog)
Get permission of template node
|
String |
getMetadataTemplate(String name,
boolean isDialog)
Get content of dialog template node or view template in current repository
|
boolean |
hasMetadata(String name)
Check node with given name exists or not below baseMetadataPath_ path in repository
|
void |
init()
Call all available in list of TemplatePlugin to
add some predefine template to all repository got
from configuration
|
void |
removeMetadata(String nodetype)
Remove node named nodetype below baseMetadataPath_
|
void |
start() |
void |
stop() |
public static final String NT_UNSTRUCTURED
public static final String INTERNAL_USE
public static final String METADATA_TYPE
public static final String DIALOGS
public static final String VIEWS
public static final String DIALOG1
public static final String VIEW1
public MetadataServiceImpl(org.exoplatform.services.jcr.ext.hierarchy.NodeHierarchyCreator nodeHierarchyCreator,
org.exoplatform.services.jcr.RepositoryService repositoryService,
DMSConfiguration dmsConfiguration)
throws Exception
nodeHierarchyCreator - NodeHierarchyCreator objectrepositoryService - RepositoryService objectdmsConfiguration - DMSConfiguration objectExceptionpublic void start()
start in interface org.picocontainer.Startablepublic void stop()
stop in interface org.picocontainer.Startablepublic void addPlugins(org.exoplatform.container.component.ComponentPlugin plugin)
plugin - public void init()
throws Exception
init in interface MetadataServiceExceptionpublic String addMetadata(String nodetype, boolean isDialog, String role, String content, boolean isAddNew) throws Exception
addMetadata in interface MetadataServicenodetype - Node name for processingisDialog - true for dialog templaterole - permissioncontent - content of templateisAddNew - false if nodetype exist in repository, true if notExceptionpublic String addMetadata(String nodetype, boolean isDialog, String role, String content, String label, boolean isAddNew) throws Exception
addMetadata in interface MetadataServicenodetype - Node name for processingisDialog - true for dialog templaterole - permissioncontent - content of templatelabel - lable of metadataisAddNew - false if nodetype exist in repository, true if notExceptionpublic void removeMetadata(String nodetype) throws Exception
removeMetadata in interface MetadataServicenodetype - name of nodeExceptionpublic List<String> getMetadataList() throws Exception
getMetadataList in interface MetadataServiceExceptionMetadataService.getAllMetadatasNodeType()public List<javax.jcr.nodetype.NodeType> getAllMetadatasNodeType() throws Exception
getAllMetadatasNodeType in interface MetadataServiceExceptionpublic String getMetadataTemplate(String name, boolean isDialog) throws Exception
getMetadataTemplate in interface MetadataServicename - Node nameisDialog - true: Get dialog template content
false: Get view template contentExceptionpublic String getMetadataPath(String name, boolean isDialog) throws Exception
getMetadataPath in interface MetadataServicename - Node nameisDialog - true: Get dialog template content
false: Get view template contentExceptionpublic String getMetadataRoles(String name, boolean isDialog) throws Exception
getMetadataRoles in interface MetadataServicename - Node nameisDialog - true: Get dialog template content
false: Get view template contentExceptionpublic boolean hasMetadata(String name) throws Exception
hasMetadata in interface MetadataServicename - Node nameExceptionpublic List<String> getExternalMetadataType() throws Exception
getExternalMetadataType in interface MetadataServiceExceptionpublic javax.jcr.Node getMetadata(String metaName) throws Exception
MetadataServicegetMetadata in interface MetadataServicemetaName - Name of metadataExceptionpublic String getMetadataLabel(String metaName) throws Exception
MetadataServicegetMetadataLabel in interface MetadataServicemetaName - Name of metadataExceptionCopyright © 2003–2019 eXo Platform SAS. All rights reserved.