001/* 002 * (C) Copyright 2013 Nuxeo SA (http://nuxeo.com/) and contributors. 003 * 004 * All rights reserved. This program and the accompanying materials 005 * are made available under the terms of the GNU Lesser General Public License 006 * (LGPL) version 2.1 which accompanies this distribution, and is available at 007 * http://www.gnu.org/licenses/lgpl-2.1.html 008 * 009 * This library is distributed in the hope that it will be useful, 010 * but WITHOUT ANY WARRANTY; without even the implied warranty of 011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 012 * Lesser General Public License for more details. 013 * 014 * Contributors: 015 * Martin Pernollet 016 */ 017 018package org.nuxeo.ecm.platform.groups.audit.service.acl.data; 019 020import java.util.Collection; 021import java.util.Set; 022 023import org.nuxeo.ecm.core.api.CoreSession; 024import org.nuxeo.ecm.core.api.DocumentModel; 025import org.nuxeo.ecm.platform.groups.audit.service.acl.data.DataProcessor.ProcessorStatus; 026 027public interface IDataProcessor { 028 public void analyze(CoreSession session); 029 030 public void analyze(CoreSession session, DocumentModel doc, int timeout); 031 032 public Set<String> getUserAndGroups(); 033 034 public Set<String> getPermissions(); 035 036 /** The maximum doc tree depth */ 037 public int getDocumentTreeMaxDepth(); 038 039 /** 040 * The minimum doc tree depth, 0 if analysis was run on repository root, >0 if the analysis was run on a child 041 * document of repository root. 042 */ 043 public int getDocumentTreeMinDepth(); 044 045 public int getNumberOfDocuments(); 046 047 public Collection<DocumentSummary> getAllDocuments(); 048 049 /** A status concerning data analysis */ 050 public ProcessorStatus getStatus(); 051 052 /** Some text information related to the status */ 053 public String getInformation(); 054}