Interface ActionFacet

  • All Superinterfaces:
    org.gcube.informationsystem.base.reference.Element, org.gcube.informationsystem.model.reference.entities.Entity, org.gcube.informationsystem.base.reference.entities.EntityElement, org.gcube.informationsystem.model.reference.ERElement, org.gcube.informationsystem.model.reference.entities.Facet, org.gcube.informationsystem.base.reference.IdentifiableElement, org.gcube.informationsystem.model.reference.ModelElement, Named, org.gcube.informationsystem.base.reference.SchemaMixedElement, Serializable
    All Known Implementing Classes:
    ActionFacetImpl

    @TypeMetadata(name="ActionFacet",
                  description="This facet is expected to capture information on which action to perform while a resource is added or removed from a context.",
                  version="1.1.0")
    @Change(version="1.1.0",description="Renamed \'type\' to \'actionType\': \'type\' is the system field holding the type name.") @Change(version="1.0.0",description="First Version")
    public interface ActionFacet
    extends org.gcube.informationsystem.model.reference.entities.Facet, Named
    This facet is expected to capture information on which action perform while a resource is added or removed from a context.
    Author:
    Manuele Simi (ISTI - CNR), Luca Frosini (ISTI - CNR)
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static String ACTION_TYPE_PROPERTY
      The name of 'actionType' property
      static String NAME
      The name associated with this facet
      static String VERSION
      The version of this type definition.
      static String WHEN_PROPERTY
      The name of 'when' property
      • Fields inherited from interface org.gcube.informationsystem.base.reference.Element

        DATETIME_PATTERN, REDACTED, TYPE_PROPERTY, UNKNOWN_USER
      • Fields inherited from interface org.gcube.informationsystem.model.reference.ERElement

        CONTEXTS_PROPERTY
      • Fields inherited from interface org.gcube.informationsystem.base.reference.IdentifiableElement

        ID_PROPERTY, METADATA_PROPERTY
      • Fields inherited from interface org.gcube.informationsystem.model.reference.ModelElement

        EXPECTED_TYPE_PROPERTY, SUPERTYPES_PROPERTY
      • Fields inherited from interface org.gcube.resourcemanagement.model.reference.properties.utilities.Named

        NAME_PROPERTY
    • Method Summary

      All Methods Static Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      EnumStringProperty getActionType()
      Type of action.
      String getCommand()
      Gets the command to execute.
      static ActionFacet getDefaultInstance()
      Returns a default instance of ActionFacet
      String getName()
      Gets the name of the facet.
      String getOptions()
      The options/params to use when executing the action.
      String getSource()
      From where to download the action.
      void setActionType​(EnumStringProperty actionType)
      Sets the type of action.
      void setCommand​(String command)
      Sets the command to execute.
      void setOptions​(String options)
      The options for the actions.
      void setSource​(String source)
      A remote source used by the command.
      • Methods inherited from interface org.gcube.informationsystem.base.reference.Element

        getTypeName
      • Methods inherited from interface org.gcube.informationsystem.base.reference.entities.EntityElement

        getID, getMetadata, setID, setMetadata
      • Methods inherited from interface org.gcube.informationsystem.model.reference.ERElement

        getContexts
      • Methods inherited from interface org.gcube.informationsystem.model.reference.entities.Facet

        getAdditionalProperties, getAdditionalProperty, setAdditionalProperties, setAdditionalProperty
      • Methods inherited from interface org.gcube.informationsystem.model.reference.ModelElement

        getExpectedType, getSupertypes
      • Methods inherited from interface org.gcube.resourcemanagement.model.reference.properties.utilities.Named

        setName
    • Method Detail

      • getDefaultInstance

        static ActionFacet getDefaultInstance()
        Returns a default instance of ActionFacet
        Returns:
        a default instance of ActionFacet
      • getName

        @ISProperty(name="name",
                    description="The name of the action.",
                    mandatory=true)
        String getName()
        Gets the name of the facet.
        Specified by:
        getName in interface Named
        Returns:
        the name
      • getActionType

        @ISProperty(name="actionType",
                    description="The type of action.",
                    mandatory=true)
        EnumStringProperty getActionType()
        Type of action.
        Returns:
        an instance of EnumStringProperty
      • getSource

        @ISProperty(description="The remote source used to download the action. Could be the endpoint of a service, the location of a remote ansible playbook, etc.",
                    mandatory=false)
        String getSource()
        From where to download the action. A remote source used by the command. Could be the endpoint of a service, the location of a remote ansible playbook, etc.
        Returns:
        URL or Endpoint
      • setSource

        void setSource​(String source)
        A remote source used by the command. Could be the endpoint of a service, the location of a remote ansible playbook, etc.
        Parameters:
        source - URL or Endpoint
      • getOptions

        @ISProperty(description="The options/params to use when executing the action.",
                    mandatory=true)
        String getOptions()
        The options/params to use when executing the action.
        Returns:
        the command to execute to launch the action
      • setOptions

        void setOptions​(String options)
        The options for the actions.
        Parameters:
        options - the options
      • getCommand

        @ISProperty(description="The command to execute.")
        String getCommand()
        Gets the command to execute.
        Returns:
        the command
      • setCommand

        void setCommand​(String command)
        Sets the command to execute.
        Parameters:
        command - the command