Class Extraction
- java.lang.Object
-
- org.ametys.plugins.extraction.execution.Extraction
-
public class Extraction extends Object
Object representing the extraction definition file content
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classExtraction.ExtractionProfileRights profilesstatic classExtraction.VisibilityVisibility of a Query
-
Field Summary
Fields Modifier and Type Field Description private UserIdentity_authorprivate String_descriptionIdprivate List<String>_displayOptionalColumnsNamesprivate List<ExtractionComponent>_extractionComponentsprivate Map<Extraction.ExtractionProfile,Set<GroupIdentity>>_grantedGroupsprivate Map<Extraction.ExtractionProfile,Set<UserIdentity>>_grantedUsersprivate Map<String,String>_queryVariablesNamesAndContentTypesprivate Extraction.Visibility_visibility
-
Constructor Summary
Constructors Constructor Description Extraction()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddExtractionComponent(ExtractionComponent extractionComponent)Add an extraction componentbooleancanRead(UserIdentity user, GroupManager groupManager)Determines if an user has READ access to this extraction.booleancanWrite(UserIdentity user, GroupManager groupManager)Determines if an user has WRITE access to this extraction.UserIdentitygetAuthor()Get the author of the extractionStringgetDescriptionId()Retrieves the identifier of the extraction's descriptionList<String>getDisplayOptionalColumnsNames()Retrieves the list of variables names controlling display of optional columnsList<ExtractionComponent>getExtractionComponents()Retrieves the list of the extraction componentsSet<GroupIdentity>getGrantedGroups(Extraction.ExtractionProfile profile)Get the granted groupsSet<UserIdentity>getGrantedUsers(Extraction.ExtractionProfile profile)Get the granted usersMap<String,String>getQueryVariablesNamesAndContentTypes()Retrieves the list of variables names and content type to use in queriesExtraction.VisibilitygetVisibility()Get the visibility of the extractionvoidsetAuthor(UserIdentity author)Set the author of this extraction.voidsetDescriptionId(String descriptionId)Set the identifier of the extraction's descriptionvoidsetDisplayOptionalColumnsNames(List<String> displayOptionalColumnsNames)Set variables names controlling display of optional columnsvoidsetGrantedGroups(Extraction.ExtractionProfile profile, Set<GroupIdentity> groups)Set the granted groupsvoidsetGrantedUsers(Extraction.ExtractionProfile profile, Set<UserIdentity> users)Set the granted usersvoidsetQueryVariablesNamesAndContentTypes(Map<String,String> queryVariablesNamesAndContentTypes)Set variables names and content types to use in queriesvoidsetVisibility(Extraction.Visibility visibility)Set the extraction's visibility
-
-
-
Field Detail
-
_descriptionId
private String _descriptionId
-
_extractionComponents
private List<ExtractionComponent> _extractionComponents
-
_displayOptionalColumnsNames
private List<String> _displayOptionalColumnsNames
-
_queryVariablesNamesAndContentTypes
private Map<String,String> _queryVariablesNamesAndContentTypes
-
_visibility
private Extraction.Visibility _visibility
-
_author
private UserIdentity _author
-
_grantedUsers
private Map<Extraction.ExtractionProfile,Set<UserIdentity>> _grantedUsers
-
_grantedGroups
private Map<Extraction.ExtractionProfile,Set<GroupIdentity>> _grantedGroups
-
-
Constructor Detail
-
Extraction
public Extraction()
-
-
Method Detail
-
getDescriptionId
public String getDescriptionId()
Retrieves the identifier of the extraction's description- Returns:
- the identifier of the extraction's description
-
setDescriptionId
public void setDescriptionId(String descriptionId)
Set the identifier of the extraction's description- Parameters:
descriptionId- the identifier to set
-
getExtractionComponents
public List<ExtractionComponent> getExtractionComponents()
Retrieves the list of the extraction components- Returns:
- The extraction components
-
addExtractionComponent
public void addExtractionComponent(ExtractionComponent extractionComponent)
Add an extraction component- Parameters:
extractionComponent- The extraction component to add
-
getDisplayOptionalColumnsNames
public List<String> getDisplayOptionalColumnsNames()
Retrieves the list of variables names controlling display of optional columns- Returns:
- The variables names
-
setDisplayOptionalColumnsNames
public void setDisplayOptionalColumnsNames(List<String> displayOptionalColumnsNames)
Set variables names controlling display of optional columns- Parameters:
displayOptionalColumnsNames- the variables for the optional columns to set
-
getQueryVariablesNamesAndContentTypes
public Map<String,String> getQueryVariablesNamesAndContentTypes()
Retrieves the list of variables names and content type to use in queries- Returns:
- A Map containing variables names and content types
-
setQueryVariablesNamesAndContentTypes
public void setQueryVariablesNamesAndContentTypes(Map<String,String> queryVariablesNamesAndContentTypes)
Set variables names and content types to use in queries- Parameters:
queryVariablesNamesAndContentTypes- A Map containing variables names and content types to set
-
getVisibility
public Extraction.Visibility getVisibility()
Get the visibility of the extraction- Returns:
- The visibility
-
setVisibility
public void setVisibility(Extraction.Visibility visibility)
Set the extraction's visibility- Parameters:
visibility- the visibility
-
getAuthor
public UserIdentity getAuthor()
Get the author of the extraction- Returns:
- The author
-
setAuthor
public void setAuthor(UserIdentity author)
Set the author of this extraction.- Parameters:
author- the author
-
getGrantedUsers
public Set<UserIdentity> getGrantedUsers(Extraction.ExtractionProfile profile)
Get the granted users- Parameters:
profile- the extraction profile- Returns:
- the granted users
-
getGrantedGroups
public Set<GroupIdentity> getGrantedGroups(Extraction.ExtractionProfile profile)
Get the granted groups- Parameters:
profile- the extraction profile- Returns:
- the granted groups
-
canRead
public boolean canRead(UserIdentity user, GroupManager groupManager)
Determines if an user has READ access to this extraction.- Parameters:
user- The usergroupManager- The group manager to determine the user's groups- Returns:
trueif the user has read access,falseotherwise
-
canWrite
public boolean canWrite(UserIdentity user, GroupManager groupManager)
Determines if an user has WRITE access to this extraction.- Parameters:
user- The usergroupManager- The group manager to determine the user's groups- Returns:
trueif the user has write access,falseotherwise
-
setGrantedUsers
public void setGrantedUsers(Extraction.ExtractionProfile profile, Set<UserIdentity> users)
Set the granted users- Parameters:
profile- the extraction profileusers- the granted users
-
setGrantedGroups
public void setGrantedGroups(Extraction.ExtractionProfile profile, Set<GroupIdentity> groups)
Set the granted groups- Parameters:
profile- the extraction profilegroups- the granted groups
-
-