use of com.agiletec.plugins.jacms.aps.system.services.resource.mock.MockResourceDataBean in project entando-core by entando.
the class ResourceManagerIntegrationTest method getNullMockResource.
private ResourceDataBean getNullMockResource(String resourceType, String resDescrToAdd) {
MockResourceDataBean bean = new MockResourceDataBean();
bean.setDescr(resDescrToAdd);
bean.setMainGroup(Group.FREE_GROUP_NAME);
bean.setResourceType(resourceType);
bean.setMimeType("text/plain");
return bean;
}
use of com.agiletec.plugins.jacms.aps.system.services.resource.mock.MockResourceDataBean in project entando-core by entando.
the class ResourceManagerIntegrationTest method getMockResource.
private ResourceDataBean getMockResource(String resourceType, String mainGroup, String resDescrToAdd, String categoryCodeToAdd) {
File file = new File("target/test/entando_logo.jpg");
MockResourceDataBean bean = new MockResourceDataBean();
bean.setFile(file);
bean.setDescr(resDescrToAdd);
bean.setMainGroup(mainGroup);
bean.setResourceType(resourceType);
bean.setMimeType("image/jpeg");
List<Category> categories = new ArrayList<Category>();
ICategoryManager catManager = (ICategoryManager) this.getService(SystemConstants.CATEGORY_MANAGER);
Category cat = catManager.getCategory(categoryCodeToAdd);
categories.add(cat);
bean.setCategories(categories);
return bean;
}
Aggregations