public class ModulesDataSource
extends org.jahia.modules.external.vfs.VFSDataSource
implements org.jahia.modules.external.ExternalDataSource.Initializable, org.jahia.modules.external.ExternalDataSource.LazyProperty
org.jahia.modules.external.ExternalDataSource.AccessControllable, org.jahia.modules.external.ExternalDataSource.CanCheckAvailability, org.jahia.modules.external.ExternalDataSource.CanLoadChildrenInBatch, org.jahia.modules.external.ExternalDataSource.Initializable, org.jahia.modules.external.ExternalDataSource.LazyProperty, org.jahia.modules.external.ExternalDataSource.Referenceable, org.jahia.modules.external.ExternalDataSource.Searchable, org.jahia.modules.external.ExternalDataSource.Writable| Constructor and Description |
|---|
ModulesDataSource() |
| Modifier and Type | Method and Description |
|---|---|
javax.jcr.Binary[] |
getBinaryPropertyValues(String path,
String propertyName) |
List<String> |
getChildren(String path)
Return the children of the specified path.
|
List<org.jahia.modules.external.ExternalData> |
getChildrenNodes(String path)
Return the children of the specified path.
|
String |
getDataType(org.apache.commons.vfs2.FileObject fileObject)
Allows to know the nodetype associated to a filetype.
|
String[] |
getI18nPropertyValues(String path,
String lang,
String propertyName) |
org.jahia.modules.external.ExternalData |
getItemByIdentifier(String identifier)
Return item by identifier
|
org.jahia.modules.external.ExternalData |
getItemByPath(String path)
Return item by path.
|
protected String |
getMessage(String message) |
protected String |
getMessage(String message,
Object... args) |
String[] |
getPropertyValues(String path,
String propertyName) |
protected File |
getRealFile(String relativePath) |
protected File |
getRealRoot() |
Set<String> |
getSupportedNodeTypes()
Return list of supported node types.
|
protected Locale |
getUILocale() |
protected void |
invalidateVfsParentCache(String fullFolderPath,
File file) |
boolean |
isNodeType(String name)
Test if the name is a known node type in the system.
|
boolean |
itemExists(String path) |
void |
move(String oldPath,
String newPath)
Move a file from one path to another one.
|
void |
order(String path,
List<String> children)
reorder children nodes according to the list passed as parameter
|
void |
removeItemByPath(String path) |
void |
saveItem(org.jahia.modules.external.ExternalData data) |
void |
setFileTypeMapping(Map<String,String> fileTypeMapping)
Inject mapping of file types to node types
|
void |
setFolderTypeMapping(Map<String,String> folderTypeMapping)
Inject mapping of folder name (type) to node types
|
void |
setJcrStoreService(org.jahia.services.content.JCRStoreService jcrStoreService) |
void |
setModule(org.jahia.data.templates.JahiaTemplatesPackage module)
Injection on runtime of the template package associated with this module source provider.
|
void |
setModulesImportExportHelper(ModulesImportExportHelper modulesImportExportHelper) |
void |
setModulesSourceSpringInitializer(ModulesSourceSpringInitializer modulesSourceSpringInitializer) |
void |
setRootResource(org.springframework.core.io.Resource root)
Set the root folder of this module source
|
void |
setSupportedNodeTypes(Set<String> supportedNodeTypes)
Injection of supported node types
|
void |
start() |
void |
stop() |
protected static final String UNSTRUCTURED_PROPERTY
protected static final String UNSTRUCTURED_CHILD_NODE
public static final String CND
public static final String CND_SLASH
public static final String JNT_EDITABLE_FILE
public static final String J_AUTO_CREATED
public static final String J_MANDATORY
public static final String J_ON_PARENT_VERSION
public static final String J_PROTECTED
public static final String J_SELECTOR_TYPE
public static final String J_SELECTOR_OPTIONS
public static final String J_REQUIRED_TYPE
public static final String J_VALUE_CONSTRAINTS
public static final String J_DEFAULT_VALUES
public static final String J_MULTIPLE
public static final String J_AVAILABLE_QUERY_OPERATORS
public static final String J_IS_FULL_TEXT_SEARCHABLE
public static final String J_IS_QUERY_ORDERABLE
public static final String J_IS_FACETABLE
public static final String J_IS_HIERARCHICAL
public static final String J_IS_INTERNATIONALIZED
public static final String J_IS_HIDDEN
public static final String J_INDEX
public static final String J_SCOREBOOST
public static final String J_ANALYZER
public static final String J_ON_CONFLICT_ACTION
public static final String J_ITEM_TYPE
public static final String SOURCE_CODE
public static final String JNT_NODE_TYPE
public static final String JNT_MIXIN_NODE_TYPE
public static final String JNT_PRIMARY_NODE_TYPE
public static final String JNT_DEFINITION_FILE
public void start()
start in interface org.jahia.modules.external.ExternalDataSource.Initializablepublic void stop()
stop in interface org.jahia.modules.external.ExternalDataSource.Initializablepublic List<String> getChildren(String path) throws javax.jcr.RepositoryException
getChildren in interface org.jahia.modules.external.ExternalDataSourcegetChildren in class org.jahia.modules.external.vfs.VFSDataSourcepath - path of which we want to know the childrenjavax.jcr.RepositoryExceptionpublic List<org.jahia.modules.external.ExternalData> getChildrenNodes(String path) throws javax.jcr.RepositoryException
getChildrenNodes in interface org.jahia.modules.external.ExternalDataSource.CanLoadChildrenInBatchgetChildrenNodes in class org.jahia.modules.external.vfs.VFSDataSourcepath - path of which we want to know the childrenjavax.jcr.RepositoryExceptionpublic String getDataType(org.apache.commons.vfs2.FileObject fileObject) throws org.apache.commons.vfs2.FileSystemException
getDataType in class org.jahia.modules.external.vfs.VFSDataSourcefileObject - the file object that we want to know the associated nodetypeorg.apache.commons.vfs2.FileSystemExceptionpublic boolean isNodeType(String name)
name - public org.jahia.modules.external.ExternalData getItemByIdentifier(String identifier) throws javax.jcr.ItemNotFoundException
getItemByIdentifier in interface org.jahia.modules.external.ExternalDataSourcegetItemByIdentifier in class org.jahia.modules.external.vfs.VFSDataSourceidentifier - javax.jcr.ItemNotFoundExceptionpublic org.jahia.modules.external.ExternalData getItemByPath(String path) throws javax.jcr.PathNotFoundException
getItemByPath in interface org.jahia.modules.external.ExternalDataSourcegetItemByPath in class org.jahia.modules.external.vfs.VFSDataSourcepath - javax.jcr.PathNotFoundExceptionpublic boolean itemExists(String path)
itemExists in interface org.jahia.modules.external.ExternalDataSourceitemExists in class org.jahia.modules.external.vfs.VFSDataSourcepublic Set<String> getSupportedNodeTypes()
getSupportedNodeTypes in interface org.jahia.modules.external.ExternalDataSourcegetSupportedNodeTypes in class org.jahia.modules.external.vfs.VFSDataSourcepublic void removeItemByPath(String path) throws javax.jcr.RepositoryException
removeItemByPath in interface org.jahia.modules.external.ExternalDataSource.WritableremoveItemByPath in class org.jahia.modules.external.vfs.VFSDataSourcejavax.jcr.RepositoryExceptionpublic void move(String oldPath, String newPath) throws javax.jcr.RepositoryException
move in interface org.jahia.modules.external.ExternalDataSource.Writablemove in class org.jahia.modules.external.vfs.VFSDataSourceoldPath - newPath - javax.jcr.PathNotFoundExceptionjavax.jcr.RepositoryExceptionprotected Locale getUILocale()
public void order(String path, List<String> children) throws javax.jcr.RepositoryException
order in interface org.jahia.modules.external.ExternalDataSource.Writableorder in class org.jahia.modules.external.vfs.VFSDataSourcepath - children - javax.jcr.PathNotFoundExceptionjavax.jcr.RepositoryExceptionpublic void saveItem(org.jahia.modules.external.ExternalData data)
throws javax.jcr.RepositoryException
saveItem in interface org.jahia.modules.external.ExternalDataSource.WritablesaveItem in class org.jahia.modules.external.vfs.VFSDataSourcejavax.jcr.RepositoryExceptionpublic void setFileTypeMapping(Map<String,String> fileTypeMapping)
fileTypeMapping - public void setFolderTypeMapping(Map<String,String> folderTypeMapping)
folderTypeMapping - public void setRootResource(org.springframework.core.io.Resource root)
root - public void setSupportedNodeTypes(Set<String> supportedNodeTypes)
supportedNodeTypes - public void setModule(org.jahia.data.templates.JahiaTemplatesPackage module)
module - public String[] getPropertyValues(String path, String propertyName) throws javax.jcr.PathNotFoundException
getPropertyValues in interface org.jahia.modules.external.ExternalDataSource.LazyPropertyjavax.jcr.PathNotFoundExceptionpublic String[] getI18nPropertyValues(String path, String lang, String propertyName) throws javax.jcr.PathNotFoundException
getI18nPropertyValues in interface org.jahia.modules.external.ExternalDataSource.LazyPropertyjavax.jcr.PathNotFoundExceptionpublic javax.jcr.Binary[] getBinaryPropertyValues(String path, String propertyName) throws javax.jcr.PathNotFoundException
getBinaryPropertyValues in interface org.jahia.modules.external.ExternalDataSource.LazyPropertyjavax.jcr.PathNotFoundExceptionprotected File getRealFile(String relativePath) throws org.apache.commons.vfs2.FileSystemException
org.apache.commons.vfs2.FileSystemExceptionprotected File getRealRoot()
public void setJcrStoreService(org.jahia.services.content.JCRStoreService jcrStoreService)
public void setModulesSourceSpringInitializer(ModulesSourceSpringInitializer modulesSourceSpringInitializer)
public void setModulesImportExportHelper(ModulesImportExportHelper modulesImportExportHelper)
Copyright © 2004–2015 Jahia Solutions Group SA. All rights reserved.