Package org.ametys.odf.program
Class ProgramFactory
- 
- All Implemented Interfaces:
 AmetysObjectFactory<SimpleAmetysObject>,JCRAmetysObjectFactory<SimpleAmetysObject>,Component,Configurable,LogEnabled,Serviceable
- Direct Known Subclasses:
 SubProgramFactory
public class ProgramFactory extends ProgramPartFactory
ProgramFactoryfor handlingProgram 
- 
- 
Field Summary
Fields Modifier and Type Field Description private CatalogsManager_catalogsManagerprivate ExportCDMfrManager_exportCDMfrManagerprivate ExternalizableMetadataProviderExtensionPoint_extMetadataProviderEPprivate WorkflowProvider_workflowProviderstatic StringPROGRAM_CONTENT_TYPEProgramcontent typestatic StringPROGRAM_NODETYPEProgramnodetype for resources collection- 
Fields inherited from class org.ametys.plugins.repository.jcr.SimpleAmetysObjectFactory
_ametysFactoryExtensionPoint, _manager, _nodetype, _repository, _resolver, _scheme 
 - 
 
- 
Constructor Summary
Constructors Constructor Description ProgramFactory() 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private void_createContentWorkflow(Node contentNode, String workflowName)(package private) CatalogsManager_getCatalogEnumerationHelper()(package private) ExportCDMfrManager_getExportCDMfrManager()(package private) Set<String>_getSynchronizedMetadata(AbstractProgram abstractProgram)(package private) WorkflowProvider_getWorkflowProvider()<A extends AmetysObject>
AcreateChild(JCRTraversableAmetysObject object, String name, String type)Creates a child to the given object.AbstractProgramgetAmetysObject(Node node, String parentPath)Creates aAmetysObjectfrom a persistent JCR node.<A extends AmetysObject>
AgetChild(JCRTraversableAmetysObject object, String path)Returns theAmetysObjectat the given subPath, relative to the givenDefaultTraversableAmetysObject.<A extends AmetysObject>
AmetysObjectIterable<A>getChildren(JCRTraversableAmetysObject object)Returns all children of the givenDefaultTraversableAmetysObject.booleanhasChild(JCRTraversableAmetysObject object, String name)Tests if a given object has a child with a given name.(package private) voidrecreateContentWorkflow(Node contentNode)voidservice(ServiceManager manager)- 
Methods inherited from class org.ametys.odf.program.ProgramPartFactory
_getRootOrgUnitRNE 
- 
Methods inherited from class org.ametys.cms.repository.ContentFactory
createChild, getChild, getChildren, getContentDataHelper, getContentHelper, getContentSaxer, hasChild 
- 
Methods inherited from class org.ametys.plugins.repository.jcr.DefaultAmetysObjectFactory
getCurrentUser, getUnversionedDataTypeExtensionPoint, getWorkspaceNode 
- 
Methods inherited from class org.ametys.plugins.repository.jcr.SimpleAmetysObjectFactory
configure, getAmetysObjectById, getAmetysObjectById, getNode, getNodetypes, getParent, getScheme, hasAmetysObjectForId 
- 
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger 
 - 
 
 - 
 
- 
- 
Field Detail
- 
PROGRAM_NODETYPE
public static final String PROGRAM_NODETYPE
Programnodetype for resources collection- See Also:
 - Constant Field Values
 
 
- 
PROGRAM_CONTENT_TYPE
public static final String PROGRAM_CONTENT_TYPE
Programcontent type- See Also:
 - Constant Field Values
 
 
- 
_catalogsManager
private CatalogsManager _catalogsManager
 
- 
_exportCDMfrManager
private ExportCDMfrManager _exportCDMfrManager
 
- 
_workflowProvider
private WorkflowProvider _workflowProvider
 
- 
_extMetadataProviderEP
private ExternalizableMetadataProviderExtensionPoint _extMetadataProviderEP
 
 - 
 
- 
Constructor Detail
- 
ProgramFactory
public ProgramFactory()
 
 - 
 
- 
Method Detail
- 
service
public void service(ServiceManager manager) throws ServiceException
- Specified by:
 servicein interfaceServiceable- Overrides:
 servicein classProgramPartFactory- Throws:
 ServiceException
 
- 
getAmetysObject
public AbstractProgram getAmetysObject(Node node, String parentPath) throws AmetysRepositoryException
Description copied from interface:JCRAmetysObjectFactoryCreates aAmetysObjectfrom a persistent JCR node.- Specified by:
 getAmetysObjectin interfaceJCRAmetysObjectFactory<SimpleAmetysObject>- Overrides:
 getAmetysObjectin classModifiableContentFactory- Parameters:
 node- the JCR node to use.parentPath- the parent Path in the Ametys hierarchy, may benullif not known yet.- Returns:
 - the object.
 - Throws:
 AmetysRepositoryException- if an error occurs.
 
- 
getChild
public <A extends AmetysObject> A getChild(JCRTraversableAmetysObject object, String path) throws AmetysRepositoryException, UnknownAmetysObjectException
Returns theAmetysObjectat the given subPath, relative to the givenDefaultTraversableAmetysObject.- Type Parameters:
 A- the actual type ofAmetysObject.- Parameters:
 object- the contextDefaultTraversableAmetysObject.path- the sub path. Cannot benull, empty or absolute.- Returns:
 - the 
AmetysObjectat the given subPath, relative to the givenDefaultTraversableAmetysObject. - Throws:
 AmetysRepositoryException- if an error occurs.UnknownAmetysObjectException- if no such object exists.
 
- 
getChildren
public <A extends AmetysObject> AmetysObjectIterable<A> getChildren(JCRTraversableAmetysObject object) throws AmetysRepositoryException
Returns all children of the givenDefaultTraversableAmetysObject.- Type Parameters:
 A- the actual type ofAmetysObjects- Parameters:
 object- aDefaultTraversableAmetysObject.- Returns:
 - a List containing all children object in the Ametys hierarchy.
 - Throws:
 AmetysRepositoryException- if an error occurs.
 
- 
hasChild
public boolean hasChild(JCRTraversableAmetysObject object, String name) throws AmetysRepositoryException
Tests if a given object has a child with a given name.- Parameters:
 object- the context object.name- the name to test.- Returns:
 trueis the given object has a child with the given name,falseotherwise.- Throws:
 AmetysRepositoryException- if an error occurs.
 
- 
createChild
public <A extends AmetysObject> A createChild(JCRTraversableAmetysObject object, String name, String type) throws AmetysRepositoryException
Creates a child to the given object.- Type Parameters:
 A- the actual type ofAmetysObject.- Parameters:
 object- the parentAmetysObject.name- the new object's name.type- the new object's type.- Returns:
 - the newly created 
AmetysObject. - Throws:
 AmetysRepositoryException- if an error occurs.
 
- 
_getExportCDMfrManager
ExportCDMfrManager _getExportCDMfrManager()
 
- 
_getCatalogEnumerationHelper
CatalogsManager _getCatalogEnumerationHelper()
 
- 
_getWorkflowProvider
WorkflowProvider _getWorkflowProvider()
 
- 
_getSynchronizedMetadata
Set<String> _getSynchronizedMetadata(AbstractProgram abstractProgram)
 
- 
recreateContentWorkflow
void recreateContentWorkflow(Node contentNode)
 
- 
_createContentWorkflow
private void _createContentWorkflow(Node contentNode, String workflowName) throws com.opensymphony.workflow.WorkflowException, RepositoryException
- Throws:
 com.opensymphony.workflow.WorkflowExceptionRepositoryException
 
 - 
 
 -