@Test(expected = IllegalStateException.class) public void testProcessReferencesNotInitialized() throws Exception { importer.processReferences(); }
@Override public void processReferences() throws RepositoryException { checkInitialized(); for (Membership m: memberships.values()) { referenceTracker.processedReference(m); } memberships.clear(); List<Object> processed = new ArrayList<>(); for (Iterator<Object> it = referenceTracker.getProcessedReferences(); it.hasNext(); ) { Object reference = it.next(); if (reference instanceof Membership) { ((Membership) reference).process(); processed.add(reference); } else if (reference instanceof Impersonators) { ((Impersonators) reference).process(); processed.add(reference); } } referenceTracker.removeReferences(processed); }
UserImporter implements ProtectedPropertyImporter, ProtectedNodeImporter, UserConstants { @Override public void processReferences() throws RepositoryException { checkInitialized(); for (Membership m: memberships.values()) { referenceTracker.processedReference(m); } memberships.clear(); List<Object> processed = new ArrayList<>(); for (Iterator<Object> it = referenceTracker.getProcessedReferences(); it.hasNext(); ) { Object reference = it.next(); if (reference instanceof Membership) { ((Membership) reference).process(); processed.add(reference); } else if (reference instanceof Impersonators) { ((Impersonators) reference).process(); processed.add(reference); } } referenceTracker.removeReferences(processed); } }
UserImporter implements ProtectedPropertyImporter, ProtectedNodeImporter, UserConstants { @Override public void processReferences() throws RepositoryException { checkInitialized(); for (Membership m: memberships.values()) { referenceTracker.processedReference(m); } memberships.clear(); List<Object> processed = new ArrayList<>(); for (Iterator<Object> it = referenceTracker.getProcessedReferences(); it.hasNext(); ) { Object reference = it.next(); if (reference instanceof Membership) { ((Membership) reference).process(); processed.add(reference); } else if (reference instanceof Impersonators) { ((Impersonators) reference).process(); processed.add(reference); } } referenceTracker.removeReferences(processed); } UserImporter(ConfigurationParameters config); }
UserImporter implements ProtectedPropertyImporter, ProtectedNodeImporter, UserConstants { @Override public void processReferences() throws RepositoryException { checkInitialized(); for (Membership m: memberships.values()) { referenceTracker.processedReference(m); } memberships.clear(); List<Object> processed = new ArrayList<>(); for (Iterator<Object> it = referenceTracker.getProcessedReferences(); it.hasNext(); ) { Object reference = it.next(); if (reference instanceof Membership) { ((Membership) reference).process(); processed.add(reference); } else if (reference instanceof Impersonators) { ((Impersonators) reference).process(); processed.add(reference); } } referenceTracker.removeReferences(processed); } UserImporter(ConfigurationParameters config); @Override boolean init(@NotNull Session session, @NotNull Root root, @NotNull NamePathMapper namePathMapper,
            boolean isWorkspaceImport, int uuidBehavior,
            @NotNull ReferenceChangeTracker referenceTracker, @NotNull SecurityProvider securityProvider); @Override boolean handlePropInfo(@NotNull Tree parent, @NotNull PropInfo propInfo, @NotNull PropertyDefinition def); @Override void propertiesCompleted(@NotNull Tree protectedParent); @Override void processReferences(); @Override boolean start(@NotNull Tree protectedParent); @Override void startChildInfo(@NotNull NodeInfo childInfo, @NotNull List<PropInfo> propInfos); @Override void endChildInfo(); @Override void end(@NotNull Tree protectedParent); }
UserImporter implements ProtectedPropertyImporter, ProtectedNodeImporter, UserConstants { @Override public void processReferences() throws RepositoryException { checkInitialized(); for (Membership m: memberships.values()) { referenceTracker.processedReference(m); } memberships.clear(); List<Object> processed = new ArrayList<>(); for (Iterator<Object> it = referenceTracker.getProcessedReferences(); it.hasNext(); ) { Object reference = it.next(); if (reference instanceof Membership) { ((Membership) reference).process(); processed.add(reference); } else if (reference instanceof Impersonators) { ((Impersonators) reference).process(); processed.add(reference); } } referenceTracker.removeReferences(processed); } UserImporter(ConfigurationParameters config); @Override boolean init(@NotNull Session session, @NotNull Root root, @NotNull NamePathMapper namePathMapper,
            boolean isWorkspaceImport, int uuidBehavior,
            @NotNull ReferenceChangeTracker referenceTracker, @NotNull SecurityProvider securityProvider); @Override boolean handlePropInfo(@NotNull Tree parent, @NotNull PropInfo propInfo, @NotNull PropertyDefinition def); @Override void propertiesCompleted(@NotNull Tree protectedParent); @Override void processReferences(); @Override boolean start(@NotNull Tree protectedParent); @Override void startChildInfo(@NotNull NodeInfo childInfo, @NotNull List<PropInfo> propInfos); @Override void endChildInfo(); @Override void end(@NotNull Tree protectedParent);  }