|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object info.magnolia.module.data.DataModule
public class DataModule
This class handles the basic installation and configuration of the data module.
Field Summary | |
---|---|
static MessageFormat |
NODE_TYPE_DEF_TEMPLATE
|
protected static String |
NODE_TYPE_DEFINITION
Node type template for registering node types for the single types. |
protected static String |
repository
|
Constructor Summary | |
---|---|
DataModule()
|
Method Summary | |
---|---|
void |
addImporter(String name,
ImportHandler importer)
|
void |
addType(String name,
TypeDefinition type)
|
protected void |
createRootPath(TypeDefinition type)
Create the root path in the repository if it does not exist yet. |
ImportHandler |
getImporter(String name)
|
Map<String,ImportHandler> |
getImporters()
|
static DataModule |
getInstance()
|
static String |
getRepository()
|
TypeDefinition |
getType(String name)
Deprecated. since 1.4 Use getTypeDefinitionByName(String) instead. |
TypeDefinition |
getTypeDefinitionByName(String itemName)
|
List<TypeDefinition> |
getTypeDefinitions()
Get all TypeDefinitions. |
List<TypeDefinition> |
getTypeDefinitionsByRootPath(String rootPath)
Get all TypeDefinitions that have a specified root path. |
Map<String,TypeDefinition> |
getTypes()
|
protected void |
initChildTypes(info.magnolia.cms.core.Content parent,
int level,
String rootPath,
Map<String,TypeDefinition> tempTypeNodes)
Loads TypeDefinition child nodes from the repository. |
protected void |
initType(TypeDefinition type)
Initializes the given type. |
protected void |
registerCustomTypes()
Registers node types in the repository, creates rootpaths and menu items if necessary. |
protected void |
registerNodeType(TypeDefinition type)
Deprecated. since 1.4 This method doesn't seem to be used anywhere. Use DataUtil.registerNodeType(TypeDefinition) instead |
void |
setImporters(Map<String,ImportHandler> importers)
|
void |
setTypes(Map<String,TypeDefinition> types)
|
void |
start(info.magnolia.module.ModuleLifecycleContext moduleLifecycleContext)
Initialization of the module, means registration of all types and the corresponding dialogs and trees and optional importers. |
void |
stop(info.magnolia.module.ModuleLifecycleContext moduleLifecycleContext)
|
protected void |
updateDataMenu(TypeDefinition type)
Updates the sub menus for the data module menu based on the given type configuration. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static String repository
protected static final String NODE_TYPE_DEFINITION
public static final MessageFormat NODE_TYPE_DEF_TEMPLATE
Constructor Detail |
---|
public DataModule()
Method Detail |
---|
public static DataModule getInstance()
public void start(info.magnolia.module.ModuleLifecycleContext moduleLifecycleContext)
start
in interface info.magnolia.module.ModuleLifecycle
public void stop(info.magnolia.module.ModuleLifecycleContext moduleLifecycleContext)
stop
in interface info.magnolia.module.ModuleLifecycle
protected void registerCustomTypes()
protected void initType(TypeDefinition type) throws javax.jcr.RepositoryException
type
- Type to be initialized.
javax.jcr.RepositoryException
- when node type can't be registered. Most often this happens when the node type of given name already exists or when the definition is invalidprotected void createRootPath(TypeDefinition type)
protected void updateDataMenu(TypeDefinition type)
type
- the configuration of the data typeprotected void initChildTypes(info.magnolia.cms.core.Content parent, int level, String rootPath, Map<String,TypeDefinition> tempTypeNodes)
parent
- root or parent type nodelevel
- the level of the nested typesrootPath
- the parents rootPath or nullpublic static String getRepository()
@Deprecated protected void registerNodeType(TypeDefinition type) throws javax.jcr.RepositoryException
DataUtil.registerNodeType(TypeDefinition)
instead
javax.jcr.RepositoryException
public Map<String,ImportHandler> getImporters()
public void setImporters(Map<String,ImportHandler> importers)
public ImportHandler getImporter(String name)
public void addImporter(String name, ImportHandler importer)
public List<TypeDefinition> getTypeDefinitions()
public List<TypeDefinition> getTypeDefinitionsByRootPath(String rootPath)
rootPath
- public TypeDefinition getTypeDefinitionByName(String itemName)
public Map<String,TypeDefinition> getTypes()
public void setTypes(Map<String,TypeDefinition> types)
public void addType(String name, TypeDefinition type)
public TypeDefinition getType(String name)
getTypeDefinitionByName(String)
instead.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |