public class AclExcelLayoutBuilder extends Object implements IAclExcelLayoutBuilder
IContentFilter
to ignore some users/groups. This report builder uses one column per user, and
write the list of existing ACL in one cell, by using "," as separator character. A denying ACL is indicated by !S,
where S is the short name given to the ACL, as stated by the AclNameShortner
.Modifier and Type | Field and Description |
---|---|
protected org.apache.poi.ss.usermodel.CellStyle |
aclHeaderStyle |
protected static int |
CELL_WIDTH_UNIT |
protected IDataProcessor |
data |
protected IExcelBuilder |
excel |
protected IContentFilter |
filter |
protected org.apache.poi.ss.usermodel.CellStyle |
grayTextStyle |
protected ReportLayout |
layout |
protected ReportLayoutSettings |
layoutSettings |
protected String |
legendLockInheritance |
protected String |
legendPermissionDenied |
protected int |
legendSheetId |
protected String |
legendSheetName |
protected org.apache.poi.ss.usermodel.CellStyle |
lockInheritanceStyle |
protected static org.apache.commons.logging.Log |
log |
protected int |
mainSheetId |
protected String |
mainSheetName |
protected static String |
PROPERTY_LEGEND_LOCK_INHERITANCE |
protected static String |
PROPERTY_LEGEND_PERM_DENIED |
protected static String |
PROPERTY_LEGEND_SHEET_NAME |
protected static String |
PROPERTY_MAIN_SHEET_NAME |
protected AclNameShortner |
shortner |
static int |
STATUS_COL |
static int |
STATUS_ROW |
protected int |
treeLineCursor |
protected org.apache.poi.ss.usermodel.CellStyle |
userHeaderStyle |
Constructor and Description |
---|
AclExcelLayoutBuilder() |
AclExcelLayoutBuilder(IContentFilter filter) |
AclExcelLayoutBuilder(ReportLayoutSettings layout) |
AclExcelLayoutBuilder(ReportLayoutSettings layout,
IContentFilter filter) |
Modifier and Type | Method and Description |
---|---|
protected void |
analyzeAndRender(CoreSession session,
DocumentModel doc,
int timeout) |
protected void |
configure(CoreSession session) |
static ReportLayoutSettings |
defaultLayout() |
protected String |
formatAce(Pair<String,Boolean> ace) |
protected String |
formatAcl(Collection<Pair<String,Boolean>> acls)
Renders all ACE separated by a , Each ACE name is formated using
formatAce(Pair |
protected void |
formatFileTreeCellLayout(int maxDepth,
int minDepth,
int colStart)
Set column of size of each file tree column, and apply a freeze pan to fix the tree columns and header rows.
|
protected String |
formatPermission(String permission) |
IExcelBuilder |
getExcel() |
protected void |
render(IDataProcessor data) |
protected void |
renderAcl(com.google.common.collect.Multimap<String,Pair<String,Boolean>> userAcls)
Render a row with all ACL of a given input file.
|
protected void |
renderAcl(com.google.common.collect.Multimap<String,Pair<String,Boolean>> userAcls,
org.apache.poi.ss.usermodel.CellStyle style) |
protected void |
renderAcl(com.google.common.collect.Multimap<String,Pair<String,Boolean>> localAcls,
com.google.common.collect.Multimap<String,Pair<String,Boolean>> inheritedAcls)
Render local AND inherited ACL.
|
void |
renderAudit(CoreSession session)
Analyze and render an ACL audit for the complete repository in unrestricted mode.
|
void |
renderAudit(CoreSession session,
DocumentModel doc)
Analyze and render an ACL audit for the complete document tree in unrestricted mode.
|
void |
renderAudit(CoreSession session,
DocumentModel doc,
boolean unrestricted)
Analyze and render an ACL audit for the input document and its children.
|
void |
renderAudit(CoreSession session,
DocumentModel doc,
boolean unrestricted,
int timeout) |
protected void |
renderFilename(String title,
int depth,
boolean lockInheritance) |
protected void |
renderFileTreeAndAclMatrix(Collection<DocumentSummary> analyses,
int minDepth,
int maxDepth) |
protected void |
renderFinal()
Perform various general tasks, such as setting the current sheet zoom.
|
protected void |
renderHeader(int tableStartColumn,
Set<String> userOrGroups,
Set<String> permission)
Write users and groups on the first row.
|
protected void |
renderHeaderUsers(int tableStartColumn,
Set<String> userOrGroups) |
protected void |
renderInit()
Initialize layout data model and pre-built cell styles
|
protected void |
renderLegend(DataProcessor.ProcessorStatus status,
String message) |
protected int |
renderLegendAcl(int row,
int col) |
protected int |
renderLegendErrorMessage(int row,
int col,
DataProcessor.ProcessorStatus status,
String message) |
protected static org.apache.commons.logging.Log log
protected static final String PROPERTY_MAIN_SHEET_NAME
protected static final String PROPERTY_LEGEND_SHEET_NAME
protected static final String PROPERTY_LEGEND_LOCK_INHERITANCE
protected static final String PROPERTY_LEGEND_PERM_DENIED
protected IExcelBuilder excel
protected static int CELL_WIDTH_UNIT
public static int STATUS_ROW
public static int STATUS_COL
protected ReportLayoutSettings layoutSettings
protected ReportLayout layout
protected int treeLineCursor
protected org.apache.poi.ss.usermodel.CellStyle userHeaderStyle
protected org.apache.poi.ss.usermodel.CellStyle aclHeaderStyle
protected org.apache.poi.ss.usermodel.CellStyle lockInheritanceStyle
protected org.apache.poi.ss.usermodel.CellStyle grayTextStyle
protected int mainSheetId
protected int legendSheetId
protected String mainSheetName
protected String legendSheetName
protected String legendLockInheritance
protected String legendPermissionDenied
protected IContentFilter filter
protected AclNameShortner shortner
protected IDataProcessor data
public AclExcelLayoutBuilder()
public AclExcelLayoutBuilder(IContentFilter filter)
public AclExcelLayoutBuilder(ReportLayoutSettings layout)
public AclExcelLayoutBuilder(ReportLayoutSettings layout, IContentFilter filter)
public static ReportLayoutSettings defaultLayout()
public void renderAudit(CoreSession session)
IAclExcelLayoutBuilder
renderAudit
in interface IAclExcelLayoutBuilder
public void renderAudit(CoreSession session, DocumentModel doc)
IAclExcelLayoutBuilder
renderAudit
in interface IAclExcelLayoutBuilder
public void renderAudit(CoreSession session, DocumentModel doc, boolean unrestricted)
IAclExcelLayoutBuilder
renderAudit
in interface IAclExcelLayoutBuilder
public void renderAudit(CoreSession session, DocumentModel doc, boolean unrestricted, int timeout)
renderAudit
in interface IAclExcelLayoutBuilder
protected void analyzeAndRender(CoreSession session, DocumentModel doc, int timeout)
protected void configure(CoreSession session)
protected void render(IDataProcessor data)
protected void renderInit()
protected void renderFinal()
protected void renderHeader(int tableStartColumn, Set<String> userOrGroups, Set<String> permission)
protected void renderHeaderUsers(int tableStartColumn, Set<String> userOrGroups)
protected void renderFileTreeAndAclMatrix(Collection<DocumentSummary> analyses, int minDepth, int maxDepth)
protected void renderFilename(String title, int depth, boolean lockInheritance)
protected void renderAcl(com.google.common.collect.Multimap<String,Pair<String,Boolean>> userAcls)
protected void renderAcl(com.google.common.collect.Multimap<String,Pair<String,Boolean>> userAcls, org.apache.poi.ss.usermodel.CellStyle style)
protected void renderAcl(com.google.common.collect.Multimap<String,Pair<String,Boolean>> localAcls, com.google.common.collect.Multimap<String,Pair<String,Boolean>> inheritedAcls)
protected void renderLegend(DataProcessor.ProcessorStatus status, String message)
protected int renderLegendErrorMessage(int row, int col, DataProcessor.ProcessorStatus status, String message)
protected int renderLegendAcl(int row, int col)
protected String formatAcl(Collection<Pair<String,Boolean>> acls)
formatAce(Pair ace)
protected String formatPermission(String permission)
protected void formatFileTreeCellLayout(int maxDepth, int minDepth, int colStart)
public IExcelBuilder getExcel()
getExcel
in interface IAclExcelLayoutBuilder
Copyright © 2015 Nuxeo SA. All rights reserved.