List of usage examples for com.liferay.portal.kernel.service RepositoryEntryLocalServiceUtil addRepositoryEntry
public static com.liferay.portal.kernel.model.RepositoryEntry addRepositoryEntry(long userId, long groupId, long repositoryId, String mappedId, ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.PortalException
From source file:com.liferay.document.library.internal.exportimport.data.handler.test.RepositoryStagedModelDataHandlerTest.java
License:Open Source License
@Override protected Map<String, List<StagedModel>> addDependentStagedModelsMap(Group group) throws Exception { Map<String, List<StagedModel>> dependentStagedModelsMap = new HashMap<>(); long classNameId = PortalUtil.getClassNameId(LiferayRepository.class.getName()); ServiceContext serviceContext = ServiceContextTestUtil.getServiceContext(group.getGroupId(), TestPropsValues.getUserId()); Folder mountFolder = DLAppServiceUtil.addFolder(group.getGroupId(), DLFolderConstants.DEFAULT_PARENT_FOLDER_ID, RandomTestUtil.randomString(), RandomTestUtil.randomString(), serviceContext); _repository = RepositoryLocalServiceUtil.addRepository(TestPropsValues.getUserId(), group.getGroupId(), classNameId, mountFolder.getFolderId(), RandomTestUtil.randomString(), RandomTestUtil.randomString(), RandomTestUtil.randomString(), new UnicodeProperties(), false, serviceContext);//from w w w .java 2 s . c o m RepositoryEntry repositoryEntry = RepositoryEntryLocalServiceUtil.addRepositoryEntry( TestPropsValues.getUserId(), group.getGroupId(), _repository.getRepositoryId(), RandomTestUtil.randomString(), serviceContext); addDependentStagedModel(dependentStagedModelsMap, RepositoryEntry.class, repositoryEntry); return dependentStagedModelsMap; }