Class AbstractInputProps

java.lang.Object
com.iizix.prop.GProp<GProp<?>[]>
com.iizix.prop.PropCnr
com.iizix.ws.prop.AbstractInputProps
All Implemented Interfaces:
EventListener, IClassInstantiationAtResolve, IGProp<GProp<?>[]>, IPropCnr, IReferrerParticipant, IVSAccessor, IVSParticipant, IExecuteWebService, Cloneable
Direct Known Subclasses:
RESTfulInputProps

public abstract class AbstractInputProps extends PropCnr implements IVSParticipant, IExecuteWebService, IClassInstantiationAtResolve
Abstract Input Properties that ties the input to the execution of a Web Service request to VirtualSpace.
Author:
Christopher Mindus
  • Field Details

    • DEFAULT_READ_TIMEOUT

      public static final int DEFAULT_READ_TIMEOUT
      Default read timeout: 20 seconds.
      See Also:
  • Constructor Details

    • AbstractInputProps

      public AbstractInputProps()
      Creates a Input Properties container with the specified name with a null value.
    • AbstractInputProps

      public AbstractInputProps(Atom propertyAtom)
      Creates a Input Properties container with the specified name with a null value.
      Parameters:
      propertyAtom - the property atom.
  • Method Details

    • clone

      public AbstractInputProps clone()
      Clones these Input Properties.
      Overrides:
      clone in class PropCnr
    • getWebServiceProp

      public WebServiceProp getWebServiceProp()
      Gets the Web Service property.
      Returns:
      The Web Service property, or null if this property is orphaned.
    • getDescription

      public String getDescription()
      Gets the input properties description.
      Returns:
      A description, or null for none.
    • getReadTimeout

      public int getReadTimeout()
      Gets the read timeout in milliseconds.
      Returns:
      Value to use for Socket read timeout, default is 20 seconds.
    • getInputEncodingProp

      public PropCnr getInputEncodingProp()
      Gets the input encoding property container.
      Returns:
      The property container for encoding.
    • getParticipantDescription

      public String getParticipantDescription()
      Returns the given description of the referrer participant.
      Specified by:
      getParticipantDescription in interface IReferrerParticipant
    • getParticipantType

      public abstract String getParticipantType()
      Returns the given type of the referrer participant.
      Specified by:
      getParticipantType in interface IReferrerParticipant
    • getVSReference

      public VSParticipant getVSReference(Atom refAtom)
      Gets a VSReference instance from the container or any parent containers. The method is used by VSRelativeReference to look up the VSReference instance in order to resolve the relative path to the target property.
      Specified by:
      getVSReference in interface IGProp<GProp<?>[]>
      Overrides:
      getVSReference in class PropCnr
      Parameters:
      refAtom - The property atom of the requesting relative reference property.
      Returns:
      The instance of the VSReference or null if unassigned.
    • createVSReference

      public VSParticipant createVSReference(Atom refAtom, PropCnr[] returnParent)
      Creates a VSReference instance from the container or any parent containers. The method is used in the Designer to create a VirtualSpace connection for VSRelativeReference to look up the VSReference instance in order to resolve the relative path to the target property.

      This method needs to be overridden by subclasses of PropCnr that has a VSReference as property, and *SHOULD* match getVSReference(Atom).

      The default is to re-target the call to the parent container, and if the root, a folder or a file property is reached, null is returned.

      Overrides:
      createVSReference in class PropCnr
      Parameters:
      refAtom - The property asking for the VSReference.
      returnParent - An array of PropCnr [1] that will be filled in with the parent property of the VSRefernce.
      Returns:
      The instance of the VSReference or null if unassigned. The returned instance could also be a VSParticipant and should therefore be processed accordingly.

      For this method, it's a VSParticipant.

    • getVirtualSpace

      public VirtualSpace getVirtualSpace()
      Gets the VirtualSpace.
      Specified by:
      getVirtualSpace in interface IVSAccessor
      Returns:
      The VirtualSpace connected to the result set, or null for none.
    • getInputVirtualSpaceParticipant

      public VSParticipant getInputVirtualSpaceParticipant()
      Gets the input VirtualSpace participant for output data.
      Returns:
      The input VirtualSpace participating with the output data, null for none.
    • getClassReference

      public ClassReference getClassReference()
      The Java class associated with input variables.
      Returns:
      The ClassReference instance, or null for none.
    • doExecute

      public abstract IReplyContent doExecute(IAppSessionGyro appGyro, boolean doPerform) throws PropException, IOException, UnsupportedEncodingException, URISyntaxException
      Executes the Web Service request.
      Specified by:
      doExecute in interface IExecuteWebService
      Parameters:
      appGyro - The application session gyro, null for Designer.
      doPerform - Execution flag when true, test when false.
      Returns:
      The contents reply instance, or null when testing.
      Throws:
      PropException - For property errors.
      IOException - For I/O errors.
      UnsupportedEncodingException - For unsupported encodings.
      URISyntaxException - When URI syntax is invalid.