use of org.alfresco.repo.importer.ACPImportPackageHandler in project alfresco-repository by Alfresco.
the class DynamicCreateRepositoryLocation method onCreateInTxn.
private void onCreateInTxn() {
final File viewFile = ImporterBootstrap.getFile(contentViewLocation);
ImportPackageHandler acpHandler = new ACPImportPackageHandler(viewFile, null);
Location location = new Location(StoreRef.STORE_REF_WORKSPACE_SPACESSTORE);
location.setPath(getParentPath());
final ImporterBinding binding = new ImporterBinding() {
@Override
public String getValue(String key) {
return bundle.getString(key);
}
@Override
public UUID_BINDING getUUIDBinding() {
return UUID_BINDING.CREATE_NEW;
}
@Override
public QName[] getExcludedClasses() {
return null;
}
@Override
public boolean allowReferenceWithinTransaction() {
return false;
}
@Override
public ImporterContentCache getImportConentCache() {
return null;
}
};
importerService.importView(acpHandler, location, binding, (ImporterProgress) null);
}
use of org.alfresco.repo.importer.ACPImportPackageHandler in project alfresco-repository by Alfresco.
the class LoadTester method importTestData.
private void importTestData(String acpName, NodeRef space) throws IOException {
ClassPathResource acpResource = new ClassPathResource(acpName);
ACPImportPackageHandler acpHandler = new ACPImportPackageHandler(acpResource.getFile(), null);
Location importLocation = new Location(space);
importerService.importView(acpHandler, importLocation, null, null);
}
use of org.alfresco.repo.importer.ACPImportPackageHandler in project alfresco-repository by Alfresco.
the class ImapServiceImplTest method importInternal.
private void importInternal(String acpName, NodeRef space) throws IOException {
ClassPathResource acpResource = new ClassPathResource(acpName);
ACPImportPackageHandler acpHandler = new ACPImportPackageHandler(acpResource.getFile(), null);
Location importLocation = new Location(space);
importerService.importView(acpHandler, importLocation, null, null);
}
Aggregations