public class ImportExportUserRightsHelper
extends java.lang.Object
"Type";"UID";"MemberOfGroups";"Password";"Target";"read";"change";"create";"remove";"change_perm"Note: for the import it is important that the first five keywords occur in the string. If not at least these five keywords are there, the import will ignore the respective line.
ImportExportUserRightsHelper(Writer writer, char textseparator, char fieldseparator, char dataseparator, boolean exportallprincipals, ArrayList permissionlist)
or the setter setDefaultPermissionList(ArrayList permissionlist ). Remember to set the same list for the
import.| Modifier and Type | Field and Description |
|---|---|
static char |
DEFAULT_DATASEP |
| Constructor and Description |
|---|
ImportExportUserRightsHelper(java.io.Reader reader)
Constructor.
|
ImportExportUserRightsHelper(java.io.Reader reader,
boolean exportallprincipals)
Constructor.
|
ImportExportUserRightsHelper(java.io.Reader reader,
char textseparator,
char fieldseparator,
char dataseparator,
boolean exportallprincipals) |
ImportExportUserRightsHelper(java.io.Reader reader,
char textseparator,
char fieldseparator,
char dataseparator,
boolean exportallprincipals,
java.util.ArrayList permissionlist)
Constructor.
|
ImportExportUserRightsHelper(java.io.Writer writer) |
ImportExportUserRightsHelper(java.io.Writer writer,
boolean exportallprincipals) |
ImportExportUserRightsHelper(java.io.Writer writer,
char textseparator,
char fieldseparator,
char dataseparator,
boolean exportallprincipals) |
ImportExportUserRightsHelper(java.io.Writer writer,
char textseparator,
char fieldseparator,
char dataseparator,
boolean exportallprincipals,
java.util.ArrayList permissionlist) |
| Modifier and Type | Method and Description |
|---|---|
void |
exportSecurity()
Export the user rights from all users and usergroups.
|
void |
exportSecurity(java.util.Set principallist)
Writes all principals to a writer (is plaintext csv informations).
|
char |
getDataSeparator() |
java.util.ArrayList |
getDefaultPermissionList() |
int |
importSecurity()
read from a reader (for example filereader) the CSV stream, interpretes them as principals (and all SubTypes) and
writes them into the system
|
boolean |
isFlag_exportAllPrincipals()
This method returns
true when all Principals (User and/or UserGroup) should be exported no matter if
they have Rights defined or not. |
void |
setDataSeparator(char dataseparator)
Set the char for the CSV file which seperates in the field MemberOfGroups (enclosed by textseparator char)
the groups.
|
void |
setDefaultPermissionList(java.util.ArrayList permissionlist)
Set the default permissionlist.
|
void |
setFlag_exportAllPrincipals(boolean flag_usesAllPrincipals)
This method sets the export all User|UserGroup flag.
|
public static final char DEFAULT_DATASEP
public ImportExportUserRightsHelper(java.io.Reader reader)
public ImportExportUserRightsHelper(java.io.Reader reader,
boolean exportallprincipals)
exportallprincipals - should be all principals exported(true) or only those with data(false). Only needed for export.public ImportExportUserRightsHelper(java.io.Reader reader,
char textseparator,
char fieldseparator,
char dataseparator,
boolean exportallprincipals)
public ImportExportUserRightsHelper(java.io.Reader reader,
char textseparator,
char fieldseparator,
char dataseparator,
boolean exportallprincipals,
java.util.ArrayList permissionlist)
textseparator - char which enclose a csv fieldfieldseparator - char which seperates a csv fielddataseparator - char which seperates in the field MemberOfGroups thegroupsexportallprincipals - flag which indicates if all principals should be exportet (true) or only those which set rights for
types (false)permissionlist - a list with rightspublic ImportExportUserRightsHelper(java.io.Writer writer)
public ImportExportUserRightsHelper(java.io.Writer writer,
boolean exportallprincipals)
public ImportExportUserRightsHelper(java.io.Writer writer,
char textseparator,
char fieldseparator,
char dataseparator,
boolean exportallprincipals)
public ImportExportUserRightsHelper(java.io.Writer writer,
char textseparator,
char fieldseparator,
char dataseparator,
boolean exportallprincipals,
java.util.ArrayList permissionlist)
public void exportSecurity()
public void exportSecurity(java.util.Set principallist)
principallist - a list with rightspublic char getDataSeparator()
public java.util.ArrayList getDefaultPermissionList()
read, change, create, remove, change_permpublic int importSecurity()
throws JaloInvalidParameterException
JaloInvalidParameterExceptionpublic boolean isFlag_exportAllPrincipals()
true when all Principals (User and/or UserGroup) should be exported no matter if
they have Rights defined or not.public void setDataSeparator(char dataseparator)
dataseparator - the char, as default the char ',' is usedpublic void setDefaultPermissionList(java.util.ArrayList permissionlist)
permissionlist - the new list with rights to setpublic void setFlag_exportAllPrincipals(boolean flag_usesAllPrincipals)
false all User|UserGroups in the
system will be exported. These User|UserGroup which have no Rights defined will also be exported (if false)flag_usesAllPrincipals - Copyright © 2018 SAP SE. All Rights Reserved.