Class EditorJSONReplyDocument

All Implemented Interfaces:
IPropDesigner, IEditorReplyProcessor, IWSPropDesigner, EventListener, IGProp<GProp<?>[]>, IPropCnr, IReplyProcessor, Cloneable, IAdaptable

public class EditorJSONReplyDocument extends JSONReplyDocument implements IWSPropDesigner, IEditorReplyProcessor
Editor version of the JSON reply document contains information that identifies the reply transaction and maps the structured data into VSFields and VSTables (or columns).
Author:
Christopher Mindus
  • Constructor Details

    • EditorJSONReplyDocument

      public EditorJSONReplyDocument()
      Creates the property container without a name. The name must be set in all cases using the setPropertyAtom call.
    • EditorJSONReplyDocument

      public EditorJSONReplyDocument(Atom propertyAtom)
      Creates the property container with the specified name. All system-reserved names for components begins with "$".
      Parameters:
      propertyAtom - the name of the component, unique within it's parent.
  • Method Details

    • getDesigner

      public WebServiceDesignerProp getDesigner()
      Gets the Designer Extension for Properties.
      Specified by:
      getDesigner in interface IPropDesigner
      Returns:
      The instance of the Designer Extension.
    • clone

      public EditorJSONReplyDocument clone()
      Clone must be overridden.
      Overrides:
      clone in class JSONReplyDocument
      Returns:
      A cloned instance.
    • getDocumentString

      public String getDocumentString()
      Gets the Document String.
      Overrides:
      getDocumentString in class JSONReplyDocument
      Returns:
      The Document String when called in the Designer, null otherwise.
    • getDocument

      public JSONObject getDocument()
      Gets the JSON document. This method can only be used in the Designer.
      Overrides:
      getDocument in class JSONReplyDocument
      Returns:
      The JSON Document, null when not used in the Designer.
    • setDocument

      public boolean setDocument(JSONObject doc)
      Sets the Document from a Reply. This method can only be used in the Designer.
      Overrides:
      setDocument in class JSONReplyDocument
      Returns:
      true for changed document string, false for same contents or failure to save document.
    • createWrapper

      public void createWrapper()
      Create the wrapper if not done.
    • getOutput

      public EditorOutputProps getOutput()
      Gets the output properties.
      Overrides:
      getOutput in class JSONReplyDocument
      Returns:
      The output properties.
    • getWebServiceProp

      public EditorWebServiceProp getWebServiceProp()
      Gets the Web Service property.
      Overrides:
      getWebServiceProp in class JSONReplyDocument
      Returns:
      The Web Service property, or null if this property is orphaned.
    • getVirtualSpace

      public EditorVirtualSpace getVirtualSpace()
      Gets the VirtualSpace.
      Overrides:
      getVirtualSpace in class JSONReplyDocument
      Returns:
      The VirtualSpace connected the the variable input, or null for none.
    • getPossibleChildren

      public Class<?>[] getPossibleChildren()
      Gets the acceptable children property classes that can be used in conjunction with e.g. a Paste operation.
      Specified by:
      getPossibleChildren in interface IPropCnr
      Overrides:
      getPossibleChildren in class PropCnr
      Returns:
      An array containing the classes of possible children, or null for no support.
    • getCNImage

      public Image getCNImage()
      Gets the image for the Common Navigator.
      Specified by:
      getCNImage in interface IWSPropDesigner
      Returns:
      Image or null if there is no image.
    • getCNText

      public String getCNText()
      Gets the label text for the Common Navigator.
      Specified by:
      getCNText in interface IWSPropDesigner
      Returns:
      The text.
    • getCNDescriptionType

      public String getCNDescriptionType()
      Provide a type description for the status bar view, if available.
      Specified by:
      getCNDescriptionType in interface IWSPropDesigner
      Returns:
      A type description for the status bar view, or null if not available.
    • createCNToolTip

      public Composite createCNToolTip(Composite parent)
      Creates a tooltip for the input variables.
      Specified by:
      createCNToolTip in interface IWSPropDesigner
      Parameters:
      parent - The parent composite.
      Returns:
      The created composite in the parent.
    • processReply

      public boolean processReply(WebServiceEditor editor, EditorOutputProps output, boolean doPerform, List<VSComponent> list, Map<VSComponent,Throwable> errors)
      Processes a stored reply contents.
      Specified by:
      processReply in interface IEditorReplyProcessor
      Parameters:
      editor - The Editor.
      output - The output properties.
      doPerform - The reply contents.
      list - List filled with propagated items.
      errors - Map filled with errors.
      Returns:
      true for success, false if not possible.
    • couldBecomeProcessor

      public boolean couldBecomeProcessor(IReplyContent reply)
      Verifies if this processor could potentially become a valid processor if it receives identification information.
      Specified by:
      couldBecomeProcessor in interface IEditorReplyProcessor
      Parameters:
      reply - The reply contents.
      Returns:
      Flag for processor is candidate.
    • createFirstProcessorIdentification

      public PropCnr createFirstProcessorIdentification(EditorOutputProps output, IReplyContent reply)
      Creates the required identification properties to start to become a valid processor.
      Specified by:
      createFirstProcessorIdentification in interface IEditorReplyProcessor
      Parameters:
      output - The output properties.
      reply - The reply.
      Returns:
      The property container to process identifications.
    • setReply

      public DesignerProp setReply(IReplyContent reply)
      Updates the output for the processor with a new reply that should replace the old one.
      Specified by:
      setReply in interface IEditorReplyProcessor
      Parameters:
      reply - The reply.
      Returns:
      The DesignerProp that shows the output in the tree.
    • verify

      public boolean verify(PropVerification verification)
      Verifies this property container. The check performed is the extension of classes and that no circular reference is present.
      Specified by:
      verify in interface IGProp<GProp<?>[]>
      Overrides:
      verify in class PropCnr
      Parameters:
      verification - The property verification class.
      Returns:
      true if verification should proceed, false if disposed of and verification should not take place.