PrincipalPolicyImporter implements ProtectedNodeImporter, ProtectedPropertyImporter, Constants { @Override public void propertiesCompleted(@NotNull Tree protectedParent) throws RepositoryException { checkState(initialized); if (policy != null) { if (isValidProtectedParent(protectedParent, policy)) { getAccessControlManager().setPolicy(policy.getPath(), policy); } else { log.warn("Protected parent {} does not match path of PrincipalAccessControlList {}.", protectedParent.getPath(), policy.getOakPath()); getAccessControlManager().removePolicy(policy.getPath(), policy); } } } PrincipalPolicyImporter(@NotNull FilterProvider filterProvider, @NotNull MgrProvider mgrProvider); @Override boolean init(@NotNull Session session, @NotNull Root root, @NotNull NamePathMapper namePathMapper, boolean isWorkspaceImport, int uuidBehavior, @NotNull ReferenceChangeTracker referenceTracker, @NotNull SecurityProvider securityProvider); @Override void processReferences(); @Override boolean handlePropInfo(@NotNull Tree parent, @NotNull PropInfo protectedPropInfo, @NotNull PropertyDefinition def); @Override void propertiesCompleted(@NotNull Tree protectedParent); @Override boolean start(@NotNull Tree protectedParent); @Override void end(@NotNull Tree protectedParent); @Override void startChildInfo(@NotNull NodeInfo childInfo, @NotNull List<PropInfo> propInfos); @Override void endChildInfo();  }
@Test(expected = IllegalStateException.class) public void testPropertiesCompletedNotInitialized() throws Exception { importer.propertiesCompleted(mock(Tree.class)); }