Class AccessPolicyImpl

java.lang.Object
org.gcube.informationsystem.base.impl.ElementImpl
org.gcube.informationsystem.base.impl.properties.PropertyElementImpl
org.gcube.informationsystem.model.impl.properties.PropertyImpl
org.gcube.resourcemanagement.model.impl.properties.GCubePropertyImpl
org.gcube.resourcemanagement.model.impl.properties.AccessPolicyImpl
All Implemented Interfaces:
Serializable, org.gcube.informationsystem.base.reference.Element, org.gcube.informationsystem.base.reference.properties.PropertyElement, org.gcube.informationsystem.base.reference.SchemaMixedElement, org.gcube.informationsystem.model.reference.ModelElement, org.gcube.informationsystem.model.reference.properties.Property, AccessPolicy, GCubeProperty

public class AccessPolicyImpl extends GCubePropertyImpl implements AccessPolicy
Implementation of AccessPolicy.
Author:
Luca Frosini (ISTI - CNR)
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected String
    An optional note about the access policy
    protected String
    The access policy according to the schema

    Fields inherited from class org.gcube.informationsystem.base.impl.properties.PropertyElementImpl

    additionalProperties, allowedAdditionalKeys, expectedtype, supertypes

    Fields inherited from interface org.gcube.resourcemanagement.model.reference.properties.AccessPolicy

    NAME, VERSION

    Fields inherited from interface org.gcube.informationsystem.base.reference.Element

    DATETIME_PATTERN, NAME, REDACTED, TYPE_PROPERTY, UNKNOWN_USER

    Fields inherited from interface org.gcube.resourcemanagement.model.reference.properties.GCubeProperty

    NAME

    Fields inherited from interface org.gcube.informationsystem.model.reference.ModelElement

    EXPECTED_TYPE_PROPERTY, SUPERTYPES_PROPERTY

    Fields inherited from interface org.gcube.informationsystem.model.reference.properties.Property

    NAME
  • Constructor Summary

    Constructors
    Constructor
    Description
    Default constructor
  • Method Summary

    Modifier and Type
    Method
    Description
    A note associated with the access policy
    The access policy.
    protected void
    Setter for backward compatibility with ValueSchema payloads.
    void
    Sets a note associated with the access policy
    void
    setPolicy(String policy)
    Sets the access policy

    Methods inherited from class org.gcube.informationsystem.base.impl.properties.PropertyElementImpl

    addAllowedAdditionalKey, getAdditionalProperties, getAdditionalProperty, getExpectedtype, getSupertypes, setAdditionalProperties, setAdditionalProperty

    Methods inherited from class org.gcube.informationsystem.base.impl.ElementImpl

    getTypeName, toString

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface org.gcube.informationsystem.base.reference.Element

    getTypeName

    Methods inherited from interface org.gcube.informationsystem.model.reference.ModelElement

    getExpectedtype, getSupertypes

    Methods inherited from interface org.gcube.informationsystem.model.reference.properties.Property

    getAdditionalProperties, getAdditionalProperty, setAdditionalProperties, setAdditionalProperty
  • Field Details

    • policy

      protected String policy
      The access policy according to the schema
    • note

      protected String note
      An optional note about the access policy
  • Constructor Details

    • AccessPolicyImpl

      public AccessPolicyImpl()
      Default constructor
  • Method Details

    • getPolicy

      public String getPolicy()
      The access policy. Deliberately unconstrained: accepts any JSON-compatible value (string, number, object, array, ...) since the concrete shape of a policy expression is not known in advance. The Java API always exposes it as a String.
      Specified by:
      getPolicy in interface AccessPolicy
      Returns:
      the access policy
    • setPolicy

      public void setPolicy(String policy)
      Sets the access policy
      Specified by:
      setPolicy in interface AccessPolicy
      Parameters:
      policy - the access policy
    • setGenericPolicy

      protected void setGenericPolicy(Object pol)
      Setter for backward compatibility with ValueSchema payloads.
      Parameters:
      pol - the policy payload to deserialize
    • getNote

      public String getNote()
      A note associated with the access policy
      Specified by:
      getNote in interface AccessPolicy
      Returns:
      the note
    • setNote

      public void setNote(String note)
      Sets a note associated with the access policy
      Specified by:
      setNote in interface AccessPolicy
      Parameters:
      note - the note