org.osivia.nuxeo.component
Class FragmentServiceImpl
java.lang.Object
org.nuxeo.runtime.model.DefaultComponent
org.osivia.nuxeo.component.FragmentServiceImpl
- All Implemented Interfaces:
- org.nuxeo.runtime.model.Adaptable, org.nuxeo.runtime.model.Component, org.nuxeo.runtime.model.Extensible, org.nuxeo.runtime.service.TimestampedService, FragmentService
public class FragmentServiceImpl
- extends org.nuxeo.runtime.model.DefaultComponent
- implements FragmentService
Generic fragment class
|
Field Summary |
static java.lang.String |
SCHEMA
Main nuxeo schema shared by all fragments |
| Fields inherited from class org.nuxeo.runtime.model.DefaultComponent |
lastModified |
|
Method Summary |
void |
addFragmentType(FragmentDescriptor contribution)
|
java.util.Map.Entry<FragmentDescriptor,Fragment> |
findByCode(java.lang.String code)
|
java.util.Map.Entry<FragmentDescriptor,Fragment> |
getFragmentCategory(org.nuxeo.ecm.core.api.DocumentModel doc,
java.lang.String uri)
|
java.lang.String |
prepareCreation(org.nuxeo.ecm.core.api.DocumentModel doc,
Fragment specific,
java.lang.String fragmentCategory,
java.lang.String region,
java.lang.String belowUri)
Initialize a default entry in the main fragments schema |
void |
registerContribution(java.lang.Object contribution,
java.lang.String extensionPoint,
org.nuxeo.runtime.model.ComponentInstance contributor)
|
void |
removeFragmentType(FragmentDescriptor contribution)
|
void |
unregisterContribution(java.lang.Object contribution,
java.lang.String extensionPoint,
org.nuxeo.runtime.model.ComponentInstance contributor)
|
| Methods inherited from class org.nuxeo.runtime.model.DefaultComponent |
activate, applicationStarted, deactivate, getAdapter, getApplicationStartedOrder, getLastModified, registerExtension, setLastModified, setModifiedNow, unregisterExtension |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SCHEMA
public static java.lang.String SCHEMA
- Main nuxeo schema shared by all fragments
FragmentServiceImpl
public FragmentServiceImpl()
registerContribution
public void registerContribution(java.lang.Object contribution,
java.lang.String extensionPoint,
org.nuxeo.runtime.model.ComponentInstance contributor)
throws java.lang.Exception
- Overrides:
registerContribution in class org.nuxeo.runtime.model.DefaultComponent
- Throws:
java.lang.Exception
unregisterContribution
public void unregisterContribution(java.lang.Object contribution,
java.lang.String extensionPoint,
org.nuxeo.runtime.model.ComponentInstance contributor)
throws java.lang.Exception
- Overrides:
unregisterContribution in class org.nuxeo.runtime.model.DefaultComponent
- Throws:
java.lang.Exception
addFragmentType
public void addFragmentType(FragmentDescriptor contribution)
removeFragmentType
public void removeFragmentType(FragmentDescriptor contribution)
findByCode
public java.util.Map.Entry<FragmentDescriptor,Fragment> findByCode(java.lang.String code)
throws FragmentServiceException
- Specified by:
findByCode in interface FragmentService
- Throws:
FragmentServiceException
getFragmentCategory
public java.util.Map.Entry<FragmentDescriptor,Fragment> getFragmentCategory(org.nuxeo.ecm.core.api.DocumentModel doc,
java.lang.String uri)
throws FragmentServiceException
- Specified by:
getFragmentCategory in interface FragmentService
- Parameters:
doc - nuxeo documenturi - id of the fragment
- Returns:
- the fragmentCategory
- Throws:
FragmentServiceException
prepareCreation
public java.lang.String prepareCreation(org.nuxeo.ecm.core.api.DocumentModel doc,
Fragment specific,
java.lang.String fragmentCategory,
java.lang.String region,
java.lang.String belowUri)
throws FragmentServiceException
- Initialize a default entry in the main fragments schema
- Specified by:
prepareCreation in interface FragmentService
- Parameters:
doc - the current simplepageregion - the cms regionbelowUri - the position where the fragment goes
- Returns:
- the new id (timestamp)
- Throws:
FragmentServiceException
Copyright © 2013. All Rights Reserved.