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 class
Extraction.ExtractionProfile
Rights profilesstatic class
Extraction.Visibility
Visibility of a Query
-
Field Summary
Fields Modifier and Type Field Description private UserIdentity
_author
private String
_descriptionId
private List<String>
_displayOptionalColumnsNames
private List<ExtractionComponent>
_extractionComponents
private Map<Extraction.ExtractionProfile,Set<GroupIdentity>>
_grantedGroups
private Map<Extraction.ExtractionProfile,Set<UserIdentity>>
_grantedUsers
private Map<String,String>
_queryVariablesNamesAndContentTypes
private Extraction.Visibility
_visibility
-
Constructor Summary
Constructors Constructor Description Extraction()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addExtractionComponent(ExtractionComponent extractionComponent)
Add an extraction componentboolean
canRead(UserIdentity user, GroupManager groupManager)
Determines if an user has READ access to this extraction.boolean
canWrite(UserIdentity user, GroupManager groupManager)
Determines if an user has WRITE access to this extraction.UserIdentity
getAuthor()
Get the author of the extractionString
getDescriptionId()
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.Visibility
getVisibility()
Get the visibility of the extractionvoid
setAuthor(UserIdentity author)
Set the author of this extraction.void
setDescriptionId(String descriptionId)
Set the identifier of the extraction's descriptionvoid
setDisplayOptionalColumnsNames(List<String> displayOptionalColumnsNames)
Set variables names controlling display of optional columnsvoid
setGrantedGroups(Extraction.ExtractionProfile profile, Set<GroupIdentity> groups)
Set the granted groupsvoid
setGrantedUsers(Extraction.ExtractionProfile profile, Set<UserIdentity> users)
Set the granted usersvoid
setQueryVariablesNamesAndContentTypes(Map<String,String> queryVariablesNamesAndContentTypes)
Set variables names and content types to use in queriesvoid
setVisibility(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:
true
if the user has read access,false
otherwise
-
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:
true
if the user has write access,false
otherwise
-
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
-
-