Search in sources :

Example 1 with RenditionDefinitionPersisterImpl

use of org.alfresco.repo.rendition.RenditionDefinitionPersisterImpl in project alfresco-repository by Alfresco.

the class HTMLRenderingEngineTest method before.

@Before
public void before() throws Exception {
    super.before();
    this.nodeService = (NodeService) this.applicationContext.getBean("NodeService");
    this.contentService = (ContentService) this.applicationContext.getBean("ContentService");
    this.renditionService = (RenditionService) this.applicationContext.getBean("RenditionService");
    this.repositoryHelper = (Repository) this.applicationContext.getBean("repositoryHelper");
    this.dictionaryService = (DictionaryService) this.applicationContext.getBean("dictionaryService");
    this.companyHome = repositoryHelper.getCompanyHome();
    createTargetFolder();
    // Setup the basic rendition definition
    QName renditionName = QName.createQName("Test");
    RenditionDefinition rd = renditionService.loadRenditionDefinition(renditionName);
    if (rd != null) {
        RenditionDefinitionPersisterImpl rdp = new RenditionDefinitionPersisterImpl();
        rdp.setNodeService(nodeService);
        rdp.deleteRenditionDefinition(rd);
    }
    def = renditionService.createRenditionDefinition(renditionName, HTMLRenderingEngine.NAME);
}
Also used : QName(org.alfresco.service.namespace.QName) RenditionDefinitionPersisterImpl(org.alfresco.repo.rendition.RenditionDefinitionPersisterImpl) RenditionDefinition(org.alfresco.service.cmr.rendition.RenditionDefinition) Before(org.junit.Before)

Aggregations

RenditionDefinitionPersisterImpl (org.alfresco.repo.rendition.RenditionDefinitionPersisterImpl)1 RenditionDefinition (org.alfresco.service.cmr.rendition.RenditionDefinition)1 QName (org.alfresco.service.namespace.QName)1 Before (org.junit.Before)1