Class AbstractMeta

    • Constructor Detail

      • AbstractMeta

        public AbstractMeta()
    • Method Detail

      • isShowDialog

        public boolean isShowDialog()
      • setShowDialog

        public void setShowDialog​(boolean showDialog)
      • isAlwaysShowRunOptions

        public boolean isAlwaysShowRunOptions()
      • setAlwaysShowRunOptions

        public void setAlwaysShowRunOptions​(boolean alwaysShowRunOptions)
      • getExtension

        protected abstract String getExtension()
      • extractNameFromFilename

        public static final String extractNameFromFilename​(boolean sync,
                                                           String name,
                                                           String filename,
                                                           String extension)
      • setNotes

        public void setNotes​(List<NotePadMeta> notes)
        Sets notes
        Parameters:
        notes - value of notes
      • getName

        public abstract String getName()
        Get the name of the pipeline. If the name is synchronized with the filename, we return the base filename.
        Specified by:
        getName in interface IEngineMeta
        Returns:
        The name of the pipeline
      • setName

        public abstract void setName​(String newName)
        Set the name.
        Specified by:
        setName in interface IEngineMeta
        Parameters:
        newName - The new name
      • isNameSynchronizedWithFilename

        public abstract boolean isNameSynchronizedWithFilename()
        Specified by:
        isNameSynchronizedWithFilename in interface IEngineMeta
        Returns:
        true if the name is derived from the filename
      • setNameSynchronizedWithFilename

        public abstract void setNameSynchronizedWithFilename​(boolean nameSynchronizedWithFilename)
        Specified by:
        setNameSynchronizedWithFilename in interface IEngineMeta
        Parameters:
        nameSynchronizedWithFilename - Set to true if the name is derived from the filename
      • getDescription

        public abstract String getDescription()
        Gets the description of the workflow.
        Returns:
        The description of the workflow
      • setDescription

        public abstract void setDescription​(String description)
        Set the description of the workflow.
        Parameters:
        description - The new description of the workflow
      • getExtendedDescription

        public abstract String getExtendedDescription()
        Gets the extended description of the workflow.
        Returns:
        The extended description of the workflow
      • setExtendedDescription

        public abstract void setExtendedDescription​(String extendedDescription)
        Set the description of the workflow.
        Parameters:
        extendedDescription - The new extended description of the workflow
      • nameFromFilename

        public void nameFromFilename()
        Builds a name - if no name is set, yet - from the filename
        Specified by:
        nameFromFilename in interface IEngineMeta
      • setFilename

        public void setFilename​(String newFilename)
        Set the filename of the workflow
        Specified by:
        setFilename in interface IEngineMeta
        Parameters:
        newFilename - The new filename of the workflow
      • setInternalHopVariables

        public abstract void setInternalHopVariables​(IVariables var)
        This method sets various internal hop variables.
        Specified by:
        setInternalHopVariables in interface IEngineMeta
        Parameters:
        var - the variables to set the internal Hop variables and values on
      • setInternalFilenameHopVariables

        protected abstract void setInternalFilenameHopVariables​(IVariables var)
        Sets the internal filename hop variables.
        Parameters:
        var - the new internal filename hop variables
      • findDatabase

        public DatabaseMeta findDatabase​(String name,
                                         IVariables variables)
        Find a database connection by it's name
        Parameters:
        name - The database name to look for
        variables - IVariables to use to resolve possible database name
        Returns:
        The database connection or null if nothing was found.
      • findDatabase

        public DatabaseMeta findDatabase​(String name,
                                         IVariables variables,
                                         boolean haltOnMissingMeta)
        Find a database connection by it's name
        Parameters:
        name - The database name to look for
        variables - IVariables to use to resolve possible database name
        haltOnMissingMeta - Raise an exception in case connection is missing
      • nrDatabases

        public int nrDatabases()
      • addNameChangedListener

        public void addNameChangedListener​(INameChangedListener listener)
        Adds the name changed listener.
        Parameters:
        listener - the listener
      • removeNameChangedListener

        public void removeNameChangedListener​(INameChangedListener listener)
        Removes the name changed listener.
        Parameters:
        listener - the listener
      • clearNameChangedListeners

        public void clearNameChangedListeners()
        Removes all the name changed listeners
      • fireNameChangedListeners

        protected void fireNameChangedListeners​(String oldName,
                                                String newName)
        Fire name changed listeners.
        Parameters:
        oldName - the old name
        newName - the new name
      • addFilenameChangedListener

        public void addFilenameChangedListener​(IFilenameChangedListener listener)
        Adds the filename changed listener.
        Parameters:
        listener - the listener
      • removeFilenameChangedListener

        public void removeFilenameChangedListener​(IFilenameChangedListener listener)
        Removes the filename changed listener.
        Parameters:
        listener - the listener
      • fireFilenameChangedListeners

        protected void fireFilenameChangedListeners​(String oldFilename,
                                                    String newFilename)
        Fire filename changed listeners.
        Parameters:
        oldFilename - the old filename
        newFilename - the new filename
      • addContentChangedListener

        public void addContentChangedListener​(IContentChangedListener listener)
        Adds the passed IContentChangedListener to the list of listeners.
        Parameters:
        listener -
      • removeContentChangedListener

        public void removeContentChangedListener​(IContentChangedListener listener)
        Removes the passed IContentChangedListener from the list of listeners.
        Parameters:
        listener -
      • fireContentChangedListeners

        protected void fireContentChangedListeners()
        Fire content changed listeners.
      • fireContentChangedListeners

        protected void fireContentChangedListeners​(boolean ch)
      • removeCurrentDirectoryChangedListener

        public void removeCurrentDirectoryChangedListener​(ICurrentDirectoryChangedListener listener)
        Add a listener to be notified of design-time changes to current directory variable
      • fireCurrentDirectoryChanged

        protected void fireCurrentDirectoryChanged​(String previous,
                                                   String current)
        Notify listeners of a change in current directory.
      • findHopServer

        public HopServer findHopServer​(String serverString)
        Find a hop server using the name
        Parameters:
        serverString - the name of the hop server
        Returns:
        the hop server or null if we couldn't spot an approriate entry.
      • getHopServerNames

        public String[] getHopServerNames()
        Gets an array of hop server names.
        Returns:
        An array list hop server names
      • addUndo

        public void addUndo​(Object[] from,
                            Object[] to,
                            int[] pos,
                            Point[] prev,
                            Point[] curr,
                            int typeOfChange,
                            boolean nextAlso)
        Description copied from interface: IUndo
        Add an undo operation to the undo list
        Specified by:
        addUndo in interface IUndo
        Parameters:
        from - array of objects representing the old state
        to - array of objectes representing the new state
        pos - An array of object locations
        prev - An array of points representing the old positions
        curr - An array of points representing the new positions
        nextAlso - indicates that the next undo operation needs to follow this one.
      • clearUndo

        public void clearUndo()
        Clear undo.
      • nextUndo

        public ChangeAction nextUndo()
        Description copied from interface: IUndo
        Get the next undo transaction on the list. Change the undo pointer.
        Specified by:
        nextUndo in interface IUndo
        Returns:
        The next undo transaction (for redo)
      • viewNextUndo

        public ChangeAction viewNextUndo()
        Description copied from interface: IUndo
        Get the next undo transaction on the list.
        Specified by:
        viewNextUndo in interface IUndo
        Returns:
        The next undo transaction (for redo)
      • previousUndo

        public ChangeAction previousUndo()
        Description copied from interface: IUndo
        Get the previous undo operation and change the undo pointer
        Specified by:
        previousUndo in interface IUndo
        Returns:
        The undo transaction to be performed.
      • viewThisUndo

        public ChangeAction viewThisUndo()
        View current undo, don't change undo position
        Specified by:
        viewThisUndo in interface IUndo
        Returns:
        The current undo transaction
      • viewPreviousUndo

        public ChangeAction viewPreviousUndo()
        Description copied from interface: IUndo
        View previous undo, don't change undo position
        Specified by:
        viewPreviousUndo in interface IUndo
        Returns:
        The previous undo transaction
      • getMaxUndo

        public int getMaxUndo()
        Description copied from interface: IUndo
        Get the maximum number of undo operations possible
        Specified by:
        getMaxUndo in interface IUndo
        Returns:
        The maximum number of undo operations that are allowed.
      • setMaxUndo

        public void setMaxUndo​(int mu)
        Description copied from interface: IUndo
        Sets the maximum number of undo operations that are allowed.
        Specified by:
        setMaxUndo in interface IUndo
        Parameters:
        mu - The maximum number of undo operations that are allowed.
      • getUndoSize

        public int getUndoSize()
        Gets the undo size.
        Returns:
        the undo size
      • addNote

        public void addNote​(int p,
                            NotePadMeta ni)
        Add a new note at a certain location (i.e. the specified index). Also marks that the notes have changed.
        Parameters:
        p - The index into the notes list
        ni - The note to be added.
      • addNote

        public void addNote​(NotePadMeta ni)
        Add a new note. Also marks that the notes have changed.
        Parameters:
        ni - The note to be added.
      • getNote

        public NotePadMeta getNote​(int x,
                                   int y)
        Find the note that is located on a certain point on the canvas.
        Parameters:
        x - the x-coordinate of the point queried
        y - the y-coordinate of the point queried
        Returns:
        The note information if a note is located at the point. Otherwise, if nothing was found: null.
      • getNote

        public NotePadMeta getNote​(int i)
        Gets the note.
        Parameters:
        i - the i
        Returns:
        the note
      • getNotes

        public List<NotePadMeta> getNotes()
        Gets the notes.
        Returns:
        the notes
      • getSelectedNotes

        public List<NotePadMeta> getSelectedNotes()
        Gets a list of all selected notes.
        Returns:
        A list of all the selected notes.
      • indexOfNote

        public int indexOfNote​(NotePadMeta ni)
        Finds the location (index) of the specified note.
        Parameters:
        ni - The note queried
        Returns:
        The location of the note, or -1 if nothing was found.
      • lowerNote

        public void lowerNote​(int p)
        Lowers a note to the "bottom" of the list by removing the note at the specified index and re-inserting it at the front. Also marks that the notes have changed.
        Parameters:
        p - the index into the notes list.
      • nrNotes

        public int nrNotes()
        Gets the number of notes.
        Returns:
        The number of notes.
      • raiseNote

        public void raiseNote​(int p)
        Raises a note to the "top" of the list by removing the note at the specified index and re-inserting it at the end. Also marks that the notes have changed.
        Parameters:
        p - the index into the notes list.
      • removeNote

        public void removeNote​(int i)
        Removes a note at a certain location (i.e. the specified index). Also marks that the notes have changed.
        Parameters:
        i - The index into the notes list
      • haveNotesChanged

        public boolean haveNotesChanged()
        Checks whether or not any of the notes have been changed.
        Returns:
        true if the notes have been changed, false otherwise
      • getNoteIndexes

        public int[] getNoteIndexes​(List<NotePadMeta> notes)
        Get an array of the locations of an array of notes
        Parameters:
        notes - An array of notes
        Returns:
        an array of the locations of an array of notes
      • getDatabases

        public List<DatabaseMeta> getDatabases()
        Returns a list of the databases.
        Returns:
        Returns the databases.
      • getDatabaseNames

        public String[] getDatabaseNames()
        Gets the database names.
        Returns:
        the database names
      • setInternalNameHopVariable

        protected abstract void setInternalNameHopVariable​(IVariables var)
        Sets the internal name hop variable.
        Parameters:
        var - the new internal name hop variable
      • getCreatedDate

        public abstract Date getCreatedDate()
        Gets the date the pipeline was created.
        Specified by:
        getCreatedDate in interface IEngineMeta
        Returns:
        the date the pipeline was created.
      • setCreatedDate

        public abstract void setCreatedDate​(Date createdDate)
        Sets the date the pipeline was created.
        Specified by:
        setCreatedDate in interface IEngineMeta
        Parameters:
        createdDate - The creation date to set.
      • setCreatedUser

        public abstract void setCreatedUser​(String createdUser)
        Sets the user by whom the pipeline was created.
        Specified by:
        setCreatedUser in interface IEngineMeta
        Parameters:
        createdUser - The user to set.
      • getCreatedUser

        public abstract String getCreatedUser()
        Gets the user by whom the pipeline was created.
        Specified by:
        getCreatedUser in interface IEngineMeta
        Returns:
        the user by whom the pipeline was created.
      • setModifiedDate

        public abstract void setModifiedDate​(Date modifiedDate)
        Sets the date the pipeline was modified.
        Specified by:
        setModifiedDate in interface IEngineMeta
        Parameters:
        modifiedDate - The modified date to set.
      • getModifiedDate

        public abstract Date getModifiedDate()
        Gets the date the pipeline was modified.
        Specified by:
        getModifiedDate in interface IEngineMeta
        Returns:
        the date the pipeline was modified.
      • setModifiedUser

        public abstract void setModifiedUser​(String modifiedUser)
        Sets the user who last modified the pipeline.
        Specified by:
        setModifiedUser in interface IEngineMeta
        Parameters:
        modifiedUser - The user name to set.
      • getModifiedUser

        public abstract String getModifiedUser()
        Gets the user who last modified the pipeline.
        Specified by:
        getModifiedUser in interface IEngineMeta
        Returns:
        the user who last modified the pipeline.
      • clear

        public void clear()
      • setChanged

        public final void setChanged​(boolean ch)
        Specified by:
        setChanged in interface IChanged
      • deleteObserver

        public void deleteObserver​(IHopObserver o)
      • notifyObservers

        public void notifyObservers​(Object arg)
      • canSave

        public boolean canSave()
        Checks whether the workflow can be saved. For WorkflowMeta, this method always returns true
        Specified by:
        canSave in interface IEngineMeta
        Returns:
        true
        See Also:
        IEngineMeta.canSave()
      • hasChanged

        public boolean hasChanged()
        Specified by:
        hasChanged in interface IChanged
      • hasMissingPlugins

        public boolean hasMissingPlugins()
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • isClearingLog

        public boolean isClearingLog()
      • setClearingLog

        public void setClearingLog​(boolean clearingLog)
      • isSafeModeEnabled

        public boolean isSafeModeEnabled()
      • setSafeModeEnabled

        public void setSafeModeEnabled​(boolean safeModeEnabled)