Search in sources :

Example 1 with ImporterBinding

use of org.alfresco.service.cmr.view.ImporterBinding in project alfresco-remote-api by Alfresco.

the class SitesImpl method importSite.

private void importSite(final String siteId, final NodeRef siteNodeRef) {
    ImportPackageHandler acpHandler = new SiteImportPackageHandler(siteSurfConfig, siteId);
    Location location = new Location(siteNodeRef);
    ImporterBinding binding = new ImporterBinding() {

        @Override
        public String getValue(String key) {
            if (key.equals("siteId")) {
                return siteId;
            }
            return null;
        }

        @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, null);
}
Also used : ImporterBinding(org.alfresco.service.cmr.view.ImporterBinding) QName(org.alfresco.service.namespace.QName) ImportPackageHandler(org.alfresco.service.cmr.view.ImportPackageHandler) FilterPropString(org.alfresco.repo.node.getchildren.FilterPropString) Location(org.alfresco.service.cmr.view.Location)

Aggregations

FilterPropString (org.alfresco.repo.node.getchildren.FilterPropString)1 ImportPackageHandler (org.alfresco.service.cmr.view.ImportPackageHandler)1 ImporterBinding (org.alfresco.service.cmr.view.ImporterBinding)1 Location (org.alfresco.service.cmr.view.Location)1 QName (org.alfresco.service.namespace.QName)1