Search in sources :

Example 1 with ResourceService

use of com.enonic.xp.resource.ResourceService in project xp by enonic.

the class AssetHandlerTest method setup.

@BeforeEach
public final void setup() throws Exception {
    this.request = new PortalRequest();
    this.resources = new HashMap<>();
    resourceService = Mockito.mock(ResourceService.class);
    when(resourceService.getResource(Mockito.any())).then(this::getResource);
    this.handler = new AssetHandler(resourceService);
    this.handler.activate(mock(PortalConfig.class, invocation -> invocation.getMethod().getDefaultValue()));
    this.nullResource = Mockito.mock(Resource.class);
    when(this.nullResource.exists()).thenReturn(false);
    this.request.setMethod(HttpMethod.GET);
    this.request.setEndpointPath("/_/asset/demo/css/main.css");
}
Also used : Assertions.assertThrows(org.junit.jupiter.api.Assertions.assertThrows) Assertions.fail(org.junit.jupiter.api.Assertions.fail) BeforeEach(org.junit.jupiter.api.BeforeEach) WebException(com.enonic.xp.web.WebException) Assertions.assertNotNull(org.junit.jupiter.api.Assertions.assertNotNull) ResourceKey(com.enonic.xp.resource.ResourceKey) MockResource(com.enonic.xp.resource.MockResource) WebResponse(com.enonic.xp.web.WebResponse) Assertions.assertNull(org.junit.jupiter.api.Assertions.assertNull) HashMap(java.util.HashMap) InvocationOnMock(org.mockito.invocation.InvocationOnMock) HttpMethod(com.enonic.xp.web.HttpMethod) PortalRequest(com.enonic.xp.portal.PortalRequest) Map(java.util.Map) PortalResponse(com.enonic.xp.portal.PortalResponse) Assertions.assertEquals(org.junit.jupiter.api.Assertions.assertEquals) MediaType(com.google.common.net.MediaType) BaseHandlerTest(com.enonic.xp.web.handler.BaseHandlerTest) ResourceService(com.enonic.xp.resource.ResourceService) Mockito.when(org.mockito.Mockito.when) RenderMode(com.enonic.xp.portal.RenderMode) ApplicationKey(com.enonic.xp.app.ApplicationKey) PortalConfig(com.enonic.xp.portal.impl.PortalConfig) Assertions.assertSame(org.junit.jupiter.api.Assertions.assertSame) Test(org.junit.jupiter.api.Test) Mockito(org.mockito.Mockito) Resource(com.enonic.xp.resource.Resource) HttpStatus(com.enonic.xp.web.HttpStatus) Mockito.mock(org.mockito.Mockito.mock) PortalConfig(com.enonic.xp.portal.impl.PortalConfig) ResourceService(com.enonic.xp.resource.ResourceService) MockResource(com.enonic.xp.resource.MockResource) Resource(com.enonic.xp.resource.Resource) PortalRequest(com.enonic.xp.portal.PortalRequest) BeforeEach(org.junit.jupiter.api.BeforeEach)

Example 2 with ResourceService

use of com.enonic.xp.resource.ResourceService in project xp by enonic.

the class IdProviderControllerServiceImplTest method setupPortalScriptService.

private PortalScriptService setupPortalScriptService() {
    final BundleContext bundleContext = Mockito.mock(BundleContext.class);
    final Bundle bundle = Mockito.mock(Bundle.class);
    Mockito.when(bundle.getBundleContext()).thenReturn(bundleContext);
    final Application application = Mockito.mock(Application.class);
    Mockito.when(application.getBundle()).thenReturn(bundle);
    Mockito.when(application.getClassLoader()).thenReturn(getClass().getClassLoader());
    Mockito.when(application.isStarted()).thenReturn(true);
    Mockito.when(application.getConfig()).thenReturn(ConfigBuilder.create().build());
    final ApplicationService applicationService = Mockito.mock(ApplicationService.class);
    Mockito.when(applicationService.getInstalledApplication(ApplicationKey.from("defaultapplication"))).thenReturn(application);
    Mockito.when(applicationService.getInstalledApplication(ApplicationKey.from("myapplication"))).thenReturn(application);
    ResourceService resourceService = Mockito.mock(ResourceService.class);
    Mockito.when(resourceService.getResource(Mockito.any())).thenAnswer(invocation -> {
        final ResourceKey resourceKey = (ResourceKey) invocation.getArguments()[0];
        final URL resourceUrl = AbstractControllerTest.class.getResource("/" + resourceKey.getApplicationKey() + resourceKey.getPath());
        return new UrlResource(resourceKey, resourceUrl);
    });
    final ScriptAsyncService scriptAsyncService = Mockito.mock(ScriptAsyncService.class);
    final ScriptRuntimeFactoryImpl runtimeFactory = new ScriptRuntimeFactoryImpl(applicationService, resourceService, scriptAsyncService);
    final PortalScriptServiceImpl scriptService = new PortalScriptServiceImpl(runtimeFactory);
    scriptService.initialize();
    return scriptService;
}
Also used : ScriptRuntimeFactoryImpl(com.enonic.xp.script.impl.standard.ScriptRuntimeFactoryImpl) UrlResource(com.enonic.xp.resource.UrlResource) Bundle(org.osgi.framework.Bundle) ResourceService(com.enonic.xp.resource.ResourceService) ScriptAsyncService(com.enonic.xp.script.impl.async.ScriptAsyncService) PortalScriptServiceImpl(com.enonic.xp.portal.impl.script.PortalScriptServiceImpl) Application(com.enonic.xp.app.Application) URL(java.net.URL) BundleContext(org.osgi.framework.BundleContext) ApplicationService(com.enonic.xp.app.ApplicationService) ResourceKey(com.enonic.xp.resource.ResourceKey)

Example 3 with ResourceService

use of com.enonic.xp.resource.ResourceService in project xp by enonic.

the class AbstractScriptTest method createScriptRuntimeFactory.

private ScriptRuntimeFactory createScriptRuntimeFactory() {
    final BundleContext bundleContext = Mockito.mock(BundleContext.class);
    final Bundle bundle = Mockito.mock(Bundle.class);
    Mockito.when(bundle.getBundleContext()).thenReturn(bundleContext);
    final Application application = Mockito.mock(Application.class);
    Mockito.when(application.getBundle()).thenReturn(bundle);
    Mockito.when(application.getKey()).thenReturn(APPLICATION_KEY);
    Mockito.when(application.getVersion()).thenReturn(Version.parseVersion("1.0.0"));
    Mockito.when(application.getClassLoader()).thenReturn(getClass().getClassLoader());
    Mockito.when(application.isStarted()).thenReturn(true);
    Mockito.when(application.getConfig()).thenReturn(ConfigBuilder.create().build());
    final ApplicationService applicationService = Mockito.mock(ApplicationService.class);
    Mockito.when(applicationService.getInstalledApplication(APPLICATION_KEY)).thenReturn(application);
    final ResourceService resourceService = Mockito.mock(ResourceService.class);
    Mockito.when(resourceService.getResource(Mockito.any())).thenAnswer(invocation -> {
        final ResourceKey resourceKey = (ResourceKey) invocation.getArguments()[0];
        final URL resourceUrl = AbstractScriptTest.class.getResource("/" + resourceKey.getApplicationKey() + resourceKey.getPath());
        return new UrlResource(resourceKey, resourceUrl);
    });
    final ScriptAsyncService scriptAsyncService = Mockito.mock(ScriptAsyncService.class);
    return new ScriptRuntimeFactoryImpl(applicationService, resourceService, scriptAsyncService);
}
Also used : ScriptRuntimeFactoryImpl(com.enonic.xp.script.impl.standard.ScriptRuntimeFactoryImpl) UrlResource(com.enonic.xp.resource.UrlResource) Bundle(org.osgi.framework.Bundle) ResourceService(com.enonic.xp.resource.ResourceService) ScriptAsyncService(com.enonic.xp.script.impl.async.ScriptAsyncService) Application(com.enonic.xp.app.Application) URL(java.net.URL) BundleContext(org.osgi.framework.BundleContext) ApplicationService(com.enonic.xp.app.ApplicationService) ResourceKey(com.enonic.xp.resource.ResourceKey)

Example 4 with ResourceService

use of com.enonic.xp.resource.ResourceService in project xp by enonic.

the class NamedTaskFactoryImplTest method setupPortalScriptService.

private PortalScriptService setupPortalScriptService() {
    final BundleContext bundleContext = mock(BundleContext.class);
    final Bundle bundle = mock(Bundle.class);
    when(bundle.getBundleContext()).thenReturn(bundleContext);
    final Application application = mock(Application.class);
    when(application.getBundle()).thenReturn(bundle);
    when(application.getClassLoader()).thenReturn(getClass().getClassLoader());
    when(application.isStarted()).thenReturn(true);
    when(application.getConfig()).thenReturn(ConfigBuilder.create().build());
    final ApplicationService applicationService = mock(ApplicationService.class);
    when(applicationService.getInstalledApplication(ApplicationKey.from("myapplication"))).thenReturn(application);
    ResourceService resourceService = mock(ResourceService.class);
    final Answer<Object> getResource = invocation -> {
        final ResourceKey resourceKey = (ResourceKey) invocation.getArguments()[0];
        final URL resourceUrl = NamedTaskFactoryImplTest.class.getResource("/" + resourceKey.getApplicationKey() + resourceKey.getPath());
        return new UrlResource(resourceKey, resourceUrl);
    };
    when(resourceService.getResource(any())).thenAnswer(getResource);
    final ScriptAsyncService scriptAsyncService = mock(ScriptAsyncService.class);
    final ScriptRuntimeFactoryImpl runtimeFactory = new ScriptRuntimeFactoryImpl(applicationService, resourceService, scriptAsyncService);
    final PortalScriptServiceImpl scriptService = new PortalScriptServiceImpl(runtimeFactory);
    scriptService.initialize();
    return scriptService;
}
Also used : Strictness(org.mockito.quality.Strictness) Assertions.assertThrows(org.junit.jupiter.api.Assertions.assertThrows) ArgumentMatchers.any(org.mockito.ArgumentMatchers.any) BeforeEach(org.junit.jupiter.api.BeforeEach) Assertions.assertNotNull(org.junit.jupiter.api.Assertions.assertNotNull) MockitoSettings(org.mockito.junit.jupiter.MockitoSettings) TaskDescriptorService(com.enonic.xp.task.TaskDescriptorService) URL(java.net.URL) Mock(org.mockito.Mock) ResourceKey(com.enonic.xp.resource.ResourceKey) PortalScriptServiceImpl(com.enonic.xp.portal.impl.script.PortalScriptServiceImpl) PortalScriptService(com.enonic.xp.portal.script.PortalScriptService) ScriptRuntimeFactoryImpl(com.enonic.xp.script.impl.standard.ScriptRuntimeFactoryImpl) Answer(org.mockito.stubbing.Answer) ExtendWith(org.junit.jupiter.api.extension.ExtendWith) RunnableTask(com.enonic.xp.task.RunnableTask) Application(com.enonic.xp.app.Application) ScriptAsyncService(com.enonic.xp.script.impl.async.ScriptAsyncService) ConfigBuilder(com.enonic.xp.config.ConfigBuilder) Bundle(org.osgi.framework.Bundle) PropertyTree(com.enonic.xp.data.PropertyTree) MockitoExtension(org.mockito.junit.jupiter.MockitoExtension) ResourceService(com.enonic.xp.resource.ResourceService) Mockito.when(org.mockito.Mockito.when) UrlResource(com.enonic.xp.resource.UrlResource) BundleContext(org.osgi.framework.BundleContext) ApplicationKey(com.enonic.xp.app.ApplicationKey) TaskId(com.enonic.xp.task.TaskId) Test(org.junit.jupiter.api.Test) TaskNotFoundException(com.enonic.xp.task.TaskNotFoundException) DescriptorKey(com.enonic.xp.page.DescriptorKey) TaskDescriptor(com.enonic.xp.task.TaskDescriptor) ApplicationService(com.enonic.xp.app.ApplicationService) Mockito.mock(org.mockito.Mockito.mock) Bundle(org.osgi.framework.Bundle) ResourceService(com.enonic.xp.resource.ResourceService) PortalScriptServiceImpl(com.enonic.xp.portal.impl.script.PortalScriptServiceImpl) URL(java.net.URL) ResourceKey(com.enonic.xp.resource.ResourceKey) ScriptRuntimeFactoryImpl(com.enonic.xp.script.impl.standard.ScriptRuntimeFactoryImpl) UrlResource(com.enonic.xp.resource.UrlResource) ScriptAsyncService(com.enonic.xp.script.impl.async.ScriptAsyncService) Application(com.enonic.xp.app.Application) BundleContext(org.osgi.framework.BundleContext) ApplicationService(com.enonic.xp.app.ApplicationService)

Example 5 with ResourceService

use of com.enonic.xp.resource.ResourceService in project xp by enonic.

the class AbstractContentServiceTest method setUpAbstractContentServiceTest.

@BeforeEach
public void setUpAbstractContentServiceTest() {
    executorService = Executors.newSingleThreadExecutor();
    deleteAllIndices();
    ContextAccessor.INSTANCE.set(ctxDefault());
    final MemoryBlobStore blobStore = new MemoryBlobStore();
    binaryService = new BinaryServiceImpl();
    binaryService.setBlobStore(blobStore);
    final StorageDaoImpl storageDao = new StorageDaoImpl();
    storageDao.setClient(client);
    final EventPublisherImpl eventPublisher = new EventPublisherImpl(executorService);
    SearchDaoImpl searchDao = new SearchDaoImpl();
    searchDao.setClient(client);
    BranchServiceImpl branchService = new BranchServiceImpl();
    branchService.setStorageDao(storageDao);
    branchService.setSearchDao(searchDao);
    VersionServiceImpl versionService = new VersionServiceImpl();
    versionService.setStorageDao(storageDao);
    CommitServiceImpl commitService = new CommitServiceImpl();
    commitService.setStorageDao(storageDao);
    IndexServiceInternalImpl indexServiceInternal = new IndexServiceInternalImpl();
    indexServiceInternal.setClient(client);
    indexService = new IndexServiceImpl();
    indexService.setIndexServiceInternal(indexServiceInternal);
    NodeVersionServiceImpl nodeDao = new NodeVersionServiceImpl();
    nodeDao.setBlobStore(blobStore);
    IndexDataServiceImpl indexedDataService = new IndexDataServiceImpl();
    indexedDataService.setStorageDao(storageDao);
    NodeStorageServiceImpl storageService = new NodeStorageServiceImpl();
    storageService.setBranchService(branchService);
    storageService.setVersionService(versionService);
    storageService.setCommitService(commitService);
    storageService.setNodeVersionService(nodeDao);
    storageService.setIndexDataService(indexedDataService);
    NodeSearchServiceImpl searchService = new NodeSearchServiceImpl();
    searchService.setSearchDao(searchDao);
    final NodeRepositoryServiceImpl nodeRepositoryService = new NodeRepositoryServiceImpl();
    nodeRepositoryService.setIndexServiceInternal(indexServiceInternal);
    final IndexServiceInternalImpl elasticsearchIndexService = new IndexServiceInternalImpl();
    elasticsearchIndexService.setClient(client);
    final RepositoryEntryServiceImpl repositoryEntryService = new RepositoryEntryServiceImpl();
    repositoryEntryService.setIndexServiceInternal(elasticsearchIndexService);
    repositoryEntryService.setNodeStorageService(storageService);
    repositoryEntryService.setNodeSearchService(searchService);
    repositoryEntryService.setEventPublisher(eventPublisher);
    repositoryEntryService.setBinaryService(binaryService);
    repositoryService = new RepositoryServiceImpl(repositoryEntryService, elasticsearchIndexService, nodeRepositoryService, storageService, searchService);
    repositoryService.initialize();
    nodeService = new NodeServiceImpl();
    nodeService.setIndexServiceInternal(indexServiceInternal);
    nodeService.setNodeStorageService(storageService);
    nodeService.setNodeSearchService(searchService);
    nodeService.setEventPublisher(eventPublisher);
    nodeService.setBinaryService(binaryService);
    nodeService.setRepositoryService(repositoryService);
    nodeService.initialize();
    mixinService = Mockito.mock(MixinService.class);
    Mockito.when(mixinService.inlineFormItems(Mockito.isA(Form.class))).then(AdditionalAnswers.returnsFirstArg());
    xDataService = Mockito.mock(XDataService.class);
    Map<String, List<String>> metadata = new HashMap<>();
    metadata.put(HttpHeaders.CONTENT_TYPE, List.of("image/jpg"));
    final ExtractedData extractedData = ExtractedData.create().metadata(metadata).build();
    final BinaryExtractor extractor = Mockito.mock(BinaryExtractor.class);
    Mockito.when(extractor.extract(Mockito.isA(ByteSource.class))).thenReturn(extractedData);
    mediaInfoService = new MediaInfoServiceImpl();
    mediaInfoService.setBinaryExtractor(extractor);
    final ResourceService resourceService = Mockito.mock(ResourceService.class);
    final SiteServiceImpl siteService = new SiteServiceImpl();
    siteService.setResourceService(resourceService);
    siteService.setMixinService(mixinService);
    contentTypeService = new ContentTypeServiceImpl(null, null, mixinService);
    PageDescriptorService pageDescriptorService = Mockito.mock(PageDescriptorService.class);
    PartDescriptorService partDescriptorService = Mockito.mock(PartDescriptorService.class);
    LayoutDescriptorService layoutDescriptorService = Mockito.mock(LayoutDescriptorService.class);
    auditLogService = Mockito.mock(AuditLogService.class);
    final ContentConfig contentConfig = Mockito.mock(ContentConfig.class);
    Mockito.when(contentConfig.auditlog_enabled()).thenReturn(Boolean.TRUE);
    final ContentAuditLogSupportImpl contentAuditLogSupport = new ContentAuditLogSupportImpl(contentConfig, new ContentAuditLogExecutorImpl(), auditLogService);
    final SecurityServiceImpl securityService = new SecurityServiceImpl(nodeService, indexService);
    securityService.initialize();
    final ProjectPermissionsContextManagerImpl projectAccessContextManager = new ProjectPermissionsContextManagerImpl();
    final ProjectServiceImpl projectService = new ProjectServiceImpl(repositoryService, indexService, nodeService, securityService, projectAccessContextManager, eventPublisher);
    projectService.initialize();
    contentService = new ContentServiceImpl(nodeService, pageDescriptorService, partDescriptorService, layoutDescriptorService);
    contentService.setEventPublisher(eventPublisher);
    contentService.setMediaInfoService(mediaInfoService);
    contentService.setSiteService(siteService);
    contentService.setContentTypeService(contentTypeService);
    contentService.setxDataService(xDataService);
    contentService.setFormDefaultValuesProcessor((form, data) -> {
    });
    contentService.setContentAuditLogSupport(contentAuditLogSupport);
    contentService.addContentValidator(new ContentNameValidator());
    contentService.addContentValidator(new SiteConfigsValidator(siteService));
    contentService.addContentValidator(new OccurrenceValidator());
    contentService.addContentValidator(new ExtraDataValidator(xDataService));
    contentService.initialize(mock(ContentConfig.class, invocation -> invocation.getMethod().getDefaultValue()));
}
Also used : BeforeEach(org.junit.jupiter.api.BeforeEach) IndexServiceInternalImpl(com.enonic.xp.repo.impl.elasticsearch.IndexServiceInternalImpl) AbstractElasticsearchIntegrationTest(com.enonic.xp.repo.impl.elasticsearch.AbstractElasticsearchIntegrationTest) NodeRepositoryServiceImpl(com.enonic.xp.repo.impl.repository.NodeRepositoryServiceImpl) RepositoryId(com.enonic.xp.repository.RepositoryId) HttpHeaders(com.google.common.net.HttpHeaders) ContextAccessor(com.enonic.xp.context.ContextAccessor) Map(java.util.Map) CreateAttachment(com.enonic.xp.attachment.CreateAttachment) IndexServiceImpl(com.enonic.xp.repo.impl.index.IndexServiceImpl) ExtraDataValidator(com.enonic.xp.core.impl.content.validate.ExtraDataValidator) LayoutDescriptorService(com.enonic.xp.region.LayoutDescriptorService) ExtraDatas(com.enonic.xp.content.ExtraDatas) Executors(java.util.concurrent.Executors) InputTypeName(com.enonic.xp.inputtype.InputTypeName) VersionServiceImpl(com.enonic.xp.repo.impl.version.VersionServiceImpl) NodeStorageServiceImpl(com.enonic.xp.repo.impl.storage.NodeStorageServiceImpl) Assertions.assertTrue(org.junit.jupiter.api.Assertions.assertTrue) BinaryServiceImpl(com.enonic.xp.repo.impl.binary.BinaryServiceImpl) RoleKeys(com.enonic.xp.security.RoleKeys) ContentAuditLogSupportImpl(com.enonic.xp.core.impl.content.ContentAuditLogSupportImpl) Mockito.mock(org.mockito.Mockito.mock) SecurityServiceImpl(com.enonic.xp.core.impl.security.SecurityServiceImpl) ContentConstants(com.enonic.xp.content.ContentConstants) LocalDateTime(java.time.LocalDateTime) FindContentVersionsResult(com.enonic.xp.content.FindContentVersionsResult) ContentNameValidator(com.enonic.xp.core.impl.content.validate.ContentNameValidator) ContentTypeName(com.enonic.xp.schema.content.ContentTypeName) FormItemSet(com.enonic.xp.form.FormItemSet) NodeServiceImpl(com.enonic.xp.repo.impl.node.NodeServiceImpl) InputTypeProperty(com.enonic.xp.inputtype.InputTypeProperty) MediaInfoServiceImpl(com.enonic.xp.core.impl.media.MediaInfoServiceImpl) PageDescriptorService(com.enonic.xp.page.PageDescriptorService) GeoPoint(com.enonic.xp.util.GeoPoint) OccurrenceValidator(com.enonic.xp.core.impl.content.validate.OccurrenceValidator) ContentTypeServiceImpl(com.enonic.xp.core.impl.schema.content.ContentTypeServiceImpl) RelationshipTypeName(com.enonic.xp.schema.relationship.RelationshipTypeName) Assertions.assertEquals(org.junit.jupiter.api.Assertions.assertEquals) ByteSource(com.google.common.io.ByteSource) RepositoryEntryServiceImpl(com.enonic.xp.repo.impl.repository.RepositoryEntryServiceImpl) ResourceService(com.enonic.xp.resource.ResourceService) ContentPath(com.enonic.xp.content.ContentPath) PropertySet(com.enonic.xp.data.PropertySet) Content(com.enonic.xp.content.Content) IOException(java.io.IOException) AuthenticationInfo(com.enonic.xp.security.auth.AuthenticationInfo) AfterEach(org.junit.jupiter.api.AfterEach) ExtractedData(com.enonic.xp.extractor.ExtractedData) ContentIds(com.enonic.xp.content.ContentIds) ContentConfig(com.enonic.xp.core.impl.content.ContentConfig) MemoryBlobStore(com.enonic.xp.internal.blobstore.MemoryBlobStore) FindContentByParentResult(com.enonic.xp.content.FindContentByParentResult) IdProviderKey(com.enonic.xp.security.IdProviderKey) Branch(com.enonic.xp.branch.Branch) IndexDataServiceImpl(com.enonic.xp.repo.impl.storage.IndexDataServiceImpl) CommitServiceImpl(com.enonic.xp.repo.impl.commit.CommitServiceImpl) ContentId(com.enonic.xp.content.ContentId) Assertions.assertFalse(org.junit.jupiter.api.Assertions.assertFalse) FindContentByParentParams(com.enonic.xp.content.FindContentByParentParams) LocalTime(java.time.LocalTime) ContextBuilder(com.enonic.xp.context.ContextBuilder) StorageDaoImpl(com.enonic.xp.repo.impl.elasticsearch.storage.StorageDaoImpl) ProjectPermissionsContextManagerImpl(com.enonic.xp.core.impl.project.ProjectPermissionsContextManagerImpl) User(com.enonic.xp.security.User) ContentServiceImpl(com.enonic.xp.core.impl.content.ContentServiceImpl) UUID(java.util.UUID) Instant(java.time.Instant) ContentType(com.enonic.xp.schema.content.ContentType) AccessControlList(com.enonic.xp.security.acl.AccessControlList) AdditionalAnswers(org.mockito.AdditionalAnswers) BinaryExtractor(com.enonic.xp.extractor.BinaryExtractor) SearchDaoImpl(com.enonic.xp.repo.impl.elasticsearch.search.SearchDaoImpl) List(java.util.List) LocalDate(java.time.LocalDate) NodeSearchServiceImpl(com.enonic.xp.repo.impl.search.NodeSearchServiceImpl) FindContentByQueryResult(com.enonic.xp.content.FindContentByQueryResult) Context(com.enonic.xp.context.Context) ProjectServiceImpl(com.enonic.xp.core.impl.project.ProjectServiceImpl) MixinService(com.enonic.xp.schema.mixin.MixinService) ContentAuditLogExecutorImpl(com.enonic.xp.core.impl.content.ContentAuditLogExecutorImpl) SiteServiceImpl(com.enonic.xp.core.impl.site.SiteServiceImpl) CreateContentParams(com.enonic.xp.content.CreateContentParams) HashMap(java.util.HashMap) RepositoryServiceImpl(com.enonic.xp.repo.impl.repository.RepositoryServiceImpl) ContentVersion(com.enonic.xp.content.ContentVersion) CreateAttachments(com.enonic.xp.attachment.CreateAttachments) FindContentVersionsParams(com.enonic.xp.content.FindContentVersionsParams) ContentInitializer(com.enonic.xp.core.impl.project.init.ContentInitializer) AuditLogService(com.enonic.xp.audit.AuditLogService) ExecutorService(java.util.concurrent.ExecutorService) XDataService(com.enonic.xp.schema.xdata.XDataService) PropertyTree(com.enonic.xp.data.PropertyTree) PartDescriptorService(com.enonic.xp.region.PartDescriptorService) Iterator(java.util.Iterator) EventPublisherImpl(com.enonic.xp.core.impl.event.EventPublisherImpl) ContentPublishInfo(com.enonic.xp.content.ContentPublishInfo) Form(com.enonic.xp.form.Form) Mockito(org.mockito.Mockito) NodeVersionServiceImpl(com.enonic.xp.repo.impl.node.dao.NodeVersionServiceImpl) PrincipalKey(com.enonic.xp.security.PrincipalKey) Reference(com.enonic.xp.util.Reference) SiteConfigsValidator(com.enonic.xp.core.impl.content.validate.SiteConfigsValidator) Input(com.enonic.xp.form.Input) BranchServiceImpl(com.enonic.xp.repo.impl.branch.storage.BranchServiceImpl) InputStream(java.io.InputStream) VersionServiceImpl(com.enonic.xp.repo.impl.version.VersionServiceImpl) NodeVersionServiceImpl(com.enonic.xp.repo.impl.node.dao.NodeVersionServiceImpl) EventPublisherImpl(com.enonic.xp.core.impl.event.EventPublisherImpl) ContentAuditLogExecutorImpl(com.enonic.xp.core.impl.content.ContentAuditLogExecutorImpl) Form(com.enonic.xp.form.Form) HashMap(java.util.HashMap) XDataService(com.enonic.xp.schema.xdata.XDataService) ResourceService(com.enonic.xp.resource.ResourceService) NodeRepositoryServiceImpl(com.enonic.xp.repo.impl.repository.NodeRepositoryServiceImpl) RepositoryServiceImpl(com.enonic.xp.repo.impl.repository.RepositoryServiceImpl) SiteServiceImpl(com.enonic.xp.core.impl.site.SiteServiceImpl) LayoutDescriptorService(com.enonic.xp.region.LayoutDescriptorService) IndexServiceImpl(com.enonic.xp.repo.impl.index.IndexServiceImpl) NodeServiceImpl(com.enonic.xp.repo.impl.node.NodeServiceImpl) ProjectServiceImpl(com.enonic.xp.core.impl.project.ProjectServiceImpl) BinaryExtractor(com.enonic.xp.extractor.BinaryExtractor) RepositoryEntryServiceImpl(com.enonic.xp.repo.impl.repository.RepositoryEntryServiceImpl) IndexServiceInternalImpl(com.enonic.xp.repo.impl.elasticsearch.IndexServiceInternalImpl) AccessControlList(com.enonic.xp.security.acl.AccessControlList) List(java.util.List) SiteConfigsValidator(com.enonic.xp.core.impl.content.validate.SiteConfigsValidator) NodeSearchServiceImpl(com.enonic.xp.repo.impl.search.NodeSearchServiceImpl) ExtraDataValidator(com.enonic.xp.core.impl.content.validate.ExtraDataValidator) BinaryServiceImpl(com.enonic.xp.repo.impl.binary.BinaryServiceImpl) PartDescriptorService(com.enonic.xp.region.PartDescriptorService) SearchDaoImpl(com.enonic.xp.repo.impl.elasticsearch.search.SearchDaoImpl) CommitServiceImpl(com.enonic.xp.repo.impl.commit.CommitServiceImpl) NodeVersionServiceImpl(com.enonic.xp.repo.impl.node.dao.NodeVersionServiceImpl) NodeRepositoryServiceImpl(com.enonic.xp.repo.impl.repository.NodeRepositoryServiceImpl) PageDescriptorService(com.enonic.xp.page.PageDescriptorService) AuditLogService(com.enonic.xp.audit.AuditLogService) MediaInfoServiceImpl(com.enonic.xp.core.impl.media.MediaInfoServiceImpl) ContentTypeServiceImpl(com.enonic.xp.core.impl.schema.content.ContentTypeServiceImpl) IndexDataServiceImpl(com.enonic.xp.repo.impl.storage.IndexDataServiceImpl) BranchServiceImpl(com.enonic.xp.repo.impl.branch.storage.BranchServiceImpl) SecurityServiceImpl(com.enonic.xp.core.impl.security.SecurityServiceImpl) MixinService(com.enonic.xp.schema.mixin.MixinService) ContentConfig(com.enonic.xp.core.impl.content.ContentConfig) ExtractedData(com.enonic.xp.extractor.ExtractedData) OccurrenceValidator(com.enonic.xp.core.impl.content.validate.OccurrenceValidator) StorageDaoImpl(com.enonic.xp.repo.impl.elasticsearch.storage.StorageDaoImpl) ContentAuditLogSupportImpl(com.enonic.xp.core.impl.content.ContentAuditLogSupportImpl) ContentServiceImpl(com.enonic.xp.core.impl.content.ContentServiceImpl) ContentNameValidator(com.enonic.xp.core.impl.content.validate.ContentNameValidator) ProjectPermissionsContextManagerImpl(com.enonic.xp.core.impl.project.ProjectPermissionsContextManagerImpl) ByteSource(com.google.common.io.ByteSource) NodeStorageServiceImpl(com.enonic.xp.repo.impl.storage.NodeStorageServiceImpl) MemoryBlobStore(com.enonic.xp.internal.blobstore.MemoryBlobStore) BeforeEach(org.junit.jupiter.api.BeforeEach)

Aggregations

ResourceService (com.enonic.xp.resource.ResourceService)9 BeforeEach (org.junit.jupiter.api.BeforeEach)5 ResourceKey (com.enonic.xp.resource.ResourceKey)4 Application (com.enonic.xp.app.Application)3 ApplicationService (com.enonic.xp.app.ApplicationService)3 PropertyTree (com.enonic.xp.data.PropertyTree)3 PortalRequest (com.enonic.xp.portal.PortalRequest)3 UrlResource (com.enonic.xp.resource.UrlResource)3 ScriptAsyncService (com.enonic.xp.script.impl.async.ScriptAsyncService)3 ScriptRuntimeFactoryImpl (com.enonic.xp.script.impl.standard.ScriptRuntimeFactoryImpl)3 URL (java.net.URL)3 Bundle (org.osgi.framework.Bundle)3 BundleContext (org.osgi.framework.BundleContext)3 ApplicationKey (com.enonic.xp.app.ApplicationKey)2 AuditLogService (com.enonic.xp.audit.AuditLogService)2 Content (com.enonic.xp.content.Content)2 ContentConstants (com.enonic.xp.content.ContentConstants)2 ContentPath (com.enonic.xp.content.ContentPath)2 ContentService (com.enonic.xp.content.ContentService)2 CreateContentParams (com.enonic.xp.content.CreateContentParams)2