001/* 002 * (C) Copyright 2013 Nuxeo SA (http://nuxeo.com/) and others. 003 * 004 * Licensed under the Apache License, Version 2.0 (the "License"); 005 * you may not use this file except in compliance with the License. 006 * You may obtain a copy of the License at 007 * 008 * http://www.apache.org/licenses/LICENSE-2.0 009 * 010 * Unless required by applicable law or agreed to in writing, software 011 * distributed under the License is distributed on an "AS IS" BASIS, 012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 013 * See the License for the specific language governing permissions and 014 * limitations under the License. 015 * 016 * Contributors: 017 * Martin Pernollet 018 */ 019 020package org.nuxeo.ecm.platform.groups.audit.service.acl.data; 021 022import java.util.Collection; 023import java.util.Set; 024 025import org.nuxeo.ecm.core.api.CoreSession; 026import org.nuxeo.ecm.core.api.DocumentModel; 027import org.nuxeo.ecm.platform.groups.audit.service.acl.data.DataProcessor.ProcessorStatus; 028 029public interface IDataProcessor { 030 public void analyze(CoreSession session); 031 032 public void analyze(CoreSession session, DocumentModel doc, int timeout); 033 034 public Set<String> getUserAndGroups(); 035 036 public Set<String> getPermissions(); 037 038 /** The maximum doc tree depth */ 039 public int getDocumentTreeMaxDepth(); 040 041 /** 042 * The minimum doc tree depth, 0 if analysis was run on repository root, >0 if the analysis was run on a child 043 * document of repository root. 044 */ 045 public int getDocumentTreeMinDepth(); 046 047 public int getNumberOfDocuments(); 048 049 public Collection<DocumentSummary> getAllDocuments(); 050 051 /** A status concerning data analysis */ 052 public ProcessorStatus getStatus(); 053 054 /** Some text information related to the status */ 055 public String getInformation(); 056}