Class NamedViewDetail
- java.lang.Object
-
- uk.gov.gchq.gaffer.data.elementdefinition.view.NamedViewDetail
-
- All Implemented Interfaces:
Serializable
,AccessControlledResource
public class NamedViewDetail extends Object implements AccessControlledResource, Serializable
Simple POJO containing the details associated with aNamedView
.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
NamedViewDetail.Builder
-
Field Summary
-
Fields inherited from interface uk.gov.gchq.gaffer.access.AccessControlledResource
DONT_CHECK_ADMIN_AUTH
-
-
Constructor Summary
Constructors Constructor Description NamedViewDetail()
NamedViewDetail(String name, String view, String description, String userId, List<String> writers, Map<String,ViewParameterDetail> parameters)
NamedViewDetail(String name, String view, String description, String userId, List<String> writers, Map<String,ViewParameterDetail> parameters, AccessPredicate readAccessPredicate, AccessPredicate writeAccessPredicate)
NamedViewDetail(String name, String view, String description, Map<String,ViewParameterDetail> parameters)
-
Method Summary
-
Methods inherited from interface uk.gov.gchq.gaffer.access.AccessControlledResource
hasReadAccess, hasWriteAccess
-
-
-
-
Constructor Detail
-
NamedViewDetail
public NamedViewDetail()
-
NamedViewDetail
public NamedViewDetail(String name, String view, String description, Map<String,ViewParameterDetail> parameters)
-
NamedViewDetail
public NamedViewDetail(String name, String view, String description, String userId, List<String> writers, Map<String,ViewParameterDetail> parameters)
-
NamedViewDetail
public NamedViewDetail(String name, String view, String description, String userId, List<String> writers, Map<String,ViewParameterDetail> parameters, AccessPredicate readAccessPredicate, AccessPredicate writeAccessPredicate)
-
-
Method Detail
-
getName
public String getName()
-
setName
public void setName(String name)
-
getView
public String getView()
-
setView
public void setView(String view)
-
setView
public void setView(View view)
-
getDescription
public String getDescription()
-
setDescription
public void setDescription(String description)
-
getCreatorId
public String getCreatorId()
-
getResourceType
public ResourceType getResourceType()
- Specified by:
getResourceType
in interfaceAccessControlledResource
-
hasReadAccess
public boolean hasReadAccess(User user, String adminAuth)
- Specified by:
hasReadAccess
in interfaceAccessControlledResource
-
hasWriteAccess
public boolean hasWriteAccess(User user, String adminAuth)
- Specified by:
hasWriteAccess
in interfaceAccessControlledResource
-
getParameters
public Map<String,ViewParameterDetail> getParameters()
-
setParameters
public void setParameters(Map<String,ViewParameterDetail> parameters)
-
getViewWithDefaultParams
public View getViewWithDefaultParams()
Gets the View after adding in default values for any parameters. If a parameter does not have a default, null is inserted.- Returns:
- The
View
- Throws:
IllegalArgumentException
- if substituting the parameters fails
-
getView
public View getView(Map<String,Object> executionParams)
Gets the View after adding in the parameters specified. If a parameter does not have a default and none is set an Exception will be thrown.- Parameters:
executionParams
- Parameters to add- Returns:
- the
View
with substituted parameters - Throws:
IllegalArgumentException
- if substituting the parameters fails
-
getReadAccessPredicate
public AccessPredicate getReadAccessPredicate()
-
getWriteAccessPredicate
public AccessPredicate getWriteAccessPredicate()
-
getOrDefaultReadAccessPredicate
public AccessPredicate getOrDefaultReadAccessPredicate()
-
getOrDefaultWriteAccessPredicate
public AccessPredicate getOrDefaultWriteAccessPredicate()
-
-