use of com.agiletec.plugins.jacms.aps.system.services.resource.IResourceManager in project entando-core by entando.
the class TestApplicationContext method testGetServices.
public void testGetServices() {
IResourceManager resourceManager = (IResourceManager) this.getService(JacmsSystemConstants.RESOURCE_MANAGER);
assertNotNull(resourceManager);
IContentManager contentManager = (IContentManager) this.getService(JacmsSystemConstants.CONTENT_MANAGER);
assertNotNull(contentManager);
IContentModelManager contentModelManager = (IContentModelManager) this.getService(JacmsSystemConstants.CONTENT_MODEL_MANAGER);
assertNotNull(contentModelManager);
IContentRenderer contentRenderer = (IContentRenderer) this.getService(JacmsSystemConstants.CONTENT_RENDERER_MANAGER);
assertNotNull(contentRenderer);
IContentDispenser contentDispenser = (IContentDispenser) this.getService(JacmsSystemConstants.CONTENT_DISPENSER_MANAGER);
assertNotNull(contentDispenser);
ICmsSearchEngineManager searchEngineManager = (ICmsSearchEngineManager) this.getService(JacmsSystemConstants.SEARCH_ENGINE_MANAGER);
assertNotNull(searchEngineManager);
ILinkResolverManager linkResolver = (ILinkResolverManager) this.getService(JacmsSystemConstants.LINK_RESOLVER_MANAGER);
assertNotNull(linkResolver);
IContentPageMapperManager contentPageMapper = (IContentPageMapperManager) this.getService(JacmsSystemConstants.CONTENT_PAGE_MAPPER_MANAGER);
assertNotNull(contentPageMapper);
}
use of com.agiletec.plugins.jacms.aps.system.services.resource.IResourceManager in project entando-core by entando.
the class TestCmsApplicationContext method testGetCmsServices.
public void testGetCmsServices() throws Throwable {
try {
IResourceManager resourceManager = (IResourceManager) this.getService(JacmsSystemConstants.RESOURCE_MANAGER);
assertNotNull(resourceManager);
IContentManager contentManager = (IContentManager) this.getService(JacmsSystemConstants.CONTENT_MANAGER);
assertNotNull(contentManager);
ICategoryManager categoryManager = (ICategoryManager) this.getService(SystemConstants.CATEGORY_MANAGER);
assertNotNull(categoryManager);
IContentModelManager contentModelManager = (IContentModelManager) this.getService(JacmsSystemConstants.CONTENT_MODEL_MANAGER);
assertNotNull(contentModelManager);
IContentRenderer contentRenderer = (IContentRenderer) this.getService(JacmsSystemConstants.CONTENT_RENDERER_MANAGER);
assertNotNull(contentRenderer);
IContentDispenser contentDispenser = (IContentDispenser) this.getService(JacmsSystemConstants.CONTENT_DISPENSER_MANAGER);
assertNotNull(contentDispenser);
ICmsSearchEngineManager searchEngineManager = (ICmsSearchEngineManager) this.getService(JacmsSystemConstants.SEARCH_ENGINE_MANAGER);
assertNotNull(searchEngineManager);
ILinkResolverManager linkResolver = (ILinkResolverManager) this.getService(JacmsSystemConstants.LINK_RESOLVER_MANAGER);
assertNotNull(linkResolver);
IContentPageMapperManager contentPageMapper = (IContentPageMapperManager) this.getService(JacmsSystemConstants.CONTENT_PAGE_MAPPER_MANAGER);
assertNotNull(contentPageMapper);
} catch (Throwable t) {
throw t;
}
}
use of com.agiletec.plugins.jacms.aps.system.services.resource.IResourceManager in project entando-core by entando.
the class TestResourceAttributeAction method initForImageRemovingTest.
private String initForImageRemovingTest() throws Throwable, ApsSystemException {
String contentId = "ART180";
Content content = this.getContentManager().loadContent(contentId, false);
this.executeEdit(contentId, "admin");
String contentOnSessionMarker = AbstractContentAction.buildContentOnSessionMarker(content, ApsAdminSystemConstants.EDIT);
Content contentOnEdit = this.getContentOnEdit(contentOnSessionMarker);
ImageAttribute imageAttribute = (ImageAttribute) contentOnEdit.getAttribute("Foto");
assertEquals("44", imageAttribute.getResource("it").getId());
assertNull(imageAttribute.getResource("en"));
IResourceManager resourceManager = (IResourceManager) this.getService(JacmsSystemConstants.RESOURCE_MANAGER);
ResourceInterface res = resourceManager.loadResource("22");
assertNotNull(res);
assertEquals("jAPS Team", res.getDescr());
imageAttribute.getResources().put("en", res);
return contentOnSessionMarker;
}
Aggregations