Class NoteHelper


  • public class NoteHelper
    extends java.lang.Object

    Überschrift: NoteHelper.

    Beschreibung: Hilfsklasse für die ELO-Notizen.

    Copyright: Copyright (c) ELO Digital Office GmbH 2018

    • Constructor Summary

      Constructors 
      Constructor Description
      NoteHelper()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static int addBorderNote​(IXconnect ixConnect, int objId, boolean personalNote, java.lang.String noteDescr)
      Fügt eine neue Randnotiz für den angegebenen Archiveintrag ein.
      static int addHorizontalLine​(IXconnect ixConnect, int objId, int pageNo, int startX, int startY, int length, int width, int color)
      Fügt eine horizontale Linie in der angegebenen Dokumentenseite ein.
      static de.elo.ix.client.Note[] addNote​(de.elo.ix.client.Note[] notes, de.elo.ix.client.Note newNote)
      Fügt die Notiz in der angegebenen Liste mit Notizen ein und liefert die Liste zurück.
      static int addStamp​(IXconnect ixConnect, int objId, java.lang.String templId, int xPos, int yPos)
      Fügt einen Stempel auf das angegebene Archivdokument ein.
      static int addTextNote​(IXconnect ixConnect, int objId, int pageNo, java.lang.String text, int startX, int startY, int height, int width, int textSize, java.lang.String textFont)
      Fügt eine Textnotiz im angegebenen Archivdokument ein.
      static boolean containsDocumentNote​(de.elo.ix.client.Note[] notes)
      Meldet zurück, ob in der Liste mindestens eine Notiz auf das Dokument vorkommt.
      static boolean containsNormalNote​(de.elo.ix.client.Note[] notes)
      Meldet zurück, ob in der Liste mindestens eine nicht gelöschte Anmerkung vorkommt.
      static de.elo.ix.client.Note createNote​(IXconnect ixConnect, de.elo.ix.client.Sord sord)
      Die Methode erzeugt eine neue Randnotiz für den angegebenen Archiveintrag.
      static de.elo.ix.client.Note createNote​(IXconnect ixConnect, java.lang.String objId)
      Die Methode erzeugt eine neue Randnotiz für den angegebenen Archiveintrag.
      static de.elo.ix.client.NoteText createNoteText()
      Erzeugt ein NoteText-Objekt, das mit den Default-Werten initialisiert wird.
      static void deleteNotes​(IXconnect ixConnect, int objId)
      Löscht alle Notizen des angegebenen Archivdokuments.
      static java.awt.Color getColor​(de.elo.ix.client.Note note)
      Die Methode liefert die Farbe für die Randnotiz.
      static java.lang.String[] getIds​(de.elo.ix.client.Note[] notes)
      Liefert eine Liste mit den IDs der angegebenen Notizen zurück.
      static de.elo.ix.client.Note[] getNotes​(IXconnect ixConnect, int objId)
      Liefert eine Liste mit den Notizen des angegebenen Archiveintrags zurück.
      static java.util.ArrayList<de.elo.ix.client.Note> getNotes​(IXconnect ixConnect, int objId, int pageNo)
      Liefert die Notizen für die angegebene Dokumentenseite zurück.
      static java.lang.String getTypeDescr​(int noteType)
      Die Methode liefert einen beschreibenden String für den angegebenen Typ der Randnotiz.
      static boolean hasNotes​(IXconnect ixConnect, int objId)
      Meldet zurück, ob der angegebene Archiveintrag Notizen hat.
      static boolean isBorderNote​(de.elo.ix.client.Note note)
      Meldet zurück, ob die angegebene Notiz eine Randnotiz ist.
      static boolean isDocumentNote​(de.elo.ix.client.Note note)
      Meldet zurück, ob die angegebene Notiz eine Notiz auf dem Dokument ist.
      static boolean isNormalNote​(de.elo.ix.client.Note note)
      Meldet zurück, ob es sich um eine allgemeine Randnotiz handelt.
      static boolean isPersonalNote​(de.elo.ix.client.Note note)
      Meldet zurück, ob es sich um eine persönliche Randnotiz handelt.
      static boolean isStamp​(de.elo.ix.client.Note note)
      Meldet zurück, ob es sich um eine permanente Randnotiz handelt.
      static boolean stampExists​(IXconnect ixConnect, java.lang.String stampText)
      Meldet zurück, ob ein Stempel mit dem angegebenen Text bereits existiert.
      static java.lang.String toHtml​(de.elo.ix.client.Note note)
      Die Methode generiert einen beschreibenden HTML-String aus der angegebenen Notiz.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • NoteHelper

        public NoteHelper()
    • Method Detail

      • isDocumentNote

        public static boolean isDocumentNote​(de.elo.ix.client.Note note)
                                      throws java.lang.Exception
        Meldet zurück, ob die angegebene Notiz eine Notiz auf dem Dokument ist.
        Parameters:
        note - Notiz
        Returns:
        Notiz auf das Dokument
        Throws:
        java.lang.Exception
      • isBorderNote

        public static boolean isBorderNote​(de.elo.ix.client.Note note)
                                    throws java.lang.Exception
        Meldet zurück, ob die angegebene Notiz eine Randnotiz ist.
        Parameters:
        note - Notiz
        Returns:
        Randnotiz
        Throws:
        java.lang.Exception
      • isNormalNote

        public static boolean isNormalNote​(de.elo.ix.client.Note note)
                                    throws java.lang.Exception
        Meldet zurück, ob es sich um eine allgemeine Randnotiz handelt.
        Parameters:
        note - Randnotiz
        Returns:
        Allgemeine Randnotiz
        Throws:
        java.lang.Exception
      • isPersonalNote

        public static boolean isPersonalNote​(de.elo.ix.client.Note note)
                                      throws java.lang.Exception
        Meldet zurück, ob es sich um eine persönliche Randnotiz handelt.
        Parameters:
        note - Randnotiz
        Returns:
        Persönliche Randnotiz
        Throws:
        java.lang.Exception
      • isStamp

        public static boolean isStamp​(de.elo.ix.client.Note note)
                               throws java.lang.Exception
        Meldet zurück, ob es sich um eine permanente Randnotiz handelt.
        Parameters:
        note - Randnotiz
        Returns:
        Permanente Randnotiz
        Throws:
        java.lang.Exception
      • createNote

        public static de.elo.ix.client.Note createNote​(IXconnect ixConnect,
                                                       de.elo.ix.client.Sord sord)
                                                throws byps.RemoteException,
                                                       java.lang.Exception
        Die Methode erzeugt eine neue Randnotiz für den angegebenen Archiveintrag.
        Parameters:
        ixConnect - Index Server Verbindung
        sord - Dokument, für welches die Randnotiz erstellt werden soll
        Returns:
        Neue Randnotiz
        Throws:
        byps.RemoteException
        java.lang.Exception
      • createNote

        public static de.elo.ix.client.Note createNote​(IXconnect ixConnect,
                                                       java.lang.String objId)
                                                throws byps.RemoteException,
                                                       java.lang.Exception
        Die Methode erzeugt eine neue Randnotiz für den angegebenen Archiveintrag.
        Parameters:
        ixConnect - Index Server Verbindung
        objId - ObjektId des Archiveintrags
        Returns:
        Neue Randnotiz
        Throws:
        byps.RemoteException
        java.lang.Exception
      • addStamp

        public static int addStamp​(IXconnect ixConnect,
                                   int objId,
                                   java.lang.String templId,
                                   int xPos,
                                   int yPos)
                            throws java.lang.Exception
        Fügt einen Stempel auf das angegebene Archivdokument ein.
        Parameters:
        ixConnect - Index Server Verbindung
        objId - Id des Archivdokuments
        templId - Id der Stempel-Vorlage
        xPos - Horizontale Position
        yPos - Vertikale Position
        Returns:
        ID des eingefügten Stempels
        Throws:
        java.lang.Exception
      • addHorizontalLine

        public static int addHorizontalLine​(IXconnect ixConnect,
                                            int objId,
                                            int pageNo,
                                            int startX,
                                            int startY,
                                            int length,
                                            int width,
                                            int color)
                                     throws java.lang.Exception
        Fügt eine horizontale Linie in der angegebenen Dokumentenseite ein.
        Parameters:
        ixConnect - Index Server Verbindung
        objId - ID des Archivdokuments
        pageNo - Seitennummer
        startX - Horizontale Anfangsposition
        startY - Vertikale Anfangsposition
        length - Länge der Linie
        width - Breite der Notiz
        color - Farbe der Notiz
        Returns:
        ID der neuen Notiz
        Throws:
        java.lang.Exception
      • addTextNote

        public static int addTextNote​(IXconnect ixConnect,
                                      int objId,
                                      int pageNo,
                                      java.lang.String text,
                                      int startX,
                                      int startY,
                                      int height,
                                      int width,
                                      int textSize,
                                      java.lang.String textFont)
                               throws java.lang.Exception
        Fügt eine Textnotiz im angegebenen Archivdokument ein.
        Parameters:
        ixConnect - Index Server Verbindung
        objId - ID des Archivdokuments
        pageNo - Seitennummer
        text - Text der Notiz
        startX - X-Position
        startY - Y-Position
        height - Notizhöhe
        width - Notizbreite
        textSize - Textgröße
        textFont - Schriftart
        Returns:
        ID der neuen Notiz
        Throws:
        java.lang.Exception
      • addBorderNote

        public static int addBorderNote​(IXconnect ixConnect,
                                        int objId,
                                        boolean personalNote,
                                        java.lang.String noteDescr)
                                 throws java.lang.Exception
        Fügt eine neue Randnotiz für den angegebenen Archiveintrag ein.
        Parameters:
        ixConnect - Index Server Verbindung
        objId - Id des Archiveintrags
        personalNote - Persönliche Randnotiz
        noteDescr - Inhalt der Notiz
        Returns:
        ID der Randnotiz
        Throws:
        java.lang.Exception
      • containsNormalNote

        public static boolean containsNormalNote​(de.elo.ix.client.Note[] notes)
                                          throws java.lang.Exception
        Meldet zurück, ob in der Liste mindestens eine nicht gelöschte Anmerkung vorkommt.
        Parameters:
        notes - Liste mit Anmerkungen
        Returns:
        Mindestens eine nicht gelöschte Anmerkung vorhanden
        Throws:
        java.lang.Exception
      • containsDocumentNote

        public static boolean containsDocumentNote​(de.elo.ix.client.Note[] notes)
                                            throws java.lang.Exception
        Meldet zurück, ob in der Liste mindestens eine Notiz auf das Dokument vorkommt.
        Parameters:
        notes - Liste mit Notizen
        Returns:
        Mindestens eine Notiz auf dem Dokument vorhanden
        Throws:
        java.lang.Exception
      • stampExists

        public static boolean stampExists​(IXconnect ixConnect,
                                          java.lang.String stampText)
                                   throws java.lang.Exception
        Meldet zurück, ob ein Stempel mit dem angegebenen Text bereits existiert.
        Parameters:
        ixConnect - Index Server Verbindung
        stampText - Stempeltext
        Returns:
        Stempel existiert
        Throws:
        java.lang.Exception
      • getNotes

        public static de.elo.ix.client.Note[] getNotes​(IXconnect ixConnect,
                                                       int objId)
                                                throws java.lang.Exception
        Liefert eine Liste mit den Notizen des angegebenen Archiveintrags zurück.
        Parameters:
        ixConnect - Index Server Verbindung
        objId - ID des Archiveintrags
        Returns:
        Liste mit Notizen
        Throws:
        java.lang.Exception
      • getNotes

        public static java.util.ArrayList<de.elo.ix.client.Note> getNotes​(IXconnect ixConnect,
                                                                          int objId,
                                                                          int pageNo)
                                                                   throws java.lang.Exception
        Liefert die Notizen für die angegebene Dokumentenseite zurück.
        Parameters:
        ixConnect - Index Server Verbindung
        objId - ID des Archiveintrags
        pageNo - Seitennummer
        Returns:
        Liste mit Notizen
        Throws:
        java.lang.Exception
      • hasNotes

        public static boolean hasNotes​(IXconnect ixConnect,
                                       int objId)
                                throws java.lang.Exception
        Meldet zurück, ob der angegebene Archiveintrag Notizen hat.
        Parameters:
        ixConnect - Index Server Verbindung
        objId - ID des Archiveintrags
        Returns:
        Archiveintrag hat Notizen
        Throws:
        java.lang.Exception
      • toHtml

        public static java.lang.String toHtml​(de.elo.ix.client.Note note)
                                       throws java.lang.Exception
        Die Methode generiert einen beschreibenden HTML-String aus der angegebenen Notiz.
        Parameters:
        note - Randnotiz
        Returns:
        HTML-String
        Throws:
        java.lang.Exception
      • getColor

        public static java.awt.Color getColor​(de.elo.ix.client.Note note)
                                       throws java.lang.Exception
        Die Methode liefert die Farbe für die Randnotiz. Diese ist vom Typ der Randnotiz abhängig (NORMAL : allgemeine Randnotiz, PERSONAL : persönliche Randnotiz, STAMP : permanente Randnotiz).
        Parameters:
        note - Randnotiz
        Returns:
        Farbe für die Haftnotiz
        Throws:
        java.lang.Exception
      • getTypeDescr

        public static java.lang.String getTypeDescr​(int noteType)
                                             throws java.lang.Exception
        Die Methode liefert einen beschreibenden String für den angegebenen Typ der Randnotiz.
        Parameters:
        noteType - Typ der Randnotiz
        Returns:
        Beschreibung des Typs der Randnotiz
        Throws:
        java.lang.Exception
      • getIds

        public static java.lang.String[] getIds​(de.elo.ix.client.Note[] notes)
                                         throws java.lang.Exception
        Liefert eine Liste mit den IDs der angegebenen Notizen zurück.
        Parameters:
        notes - Liste mit Notizen
        Returns:
        Liste mit IDs
        Throws:
        java.lang.Exception
      • deleteNotes

        public static void deleteNotes​(IXconnect ixConnect,
                                       int objId)
                                throws java.lang.Exception
        Löscht alle Notizen des angegebenen Archivdokuments.
        Parameters:
        ixConnect - Index Server Verbindung
        objId - ID des Archiveintrags
        Throws:
        java.lang.Exception
      • createNoteText

        public static de.elo.ix.client.NoteText createNoteText()
        Erzeugt ein NoteText-Objekt, das mit den Default-Werten initialisiert wird.
        Returns:
        NoteText
      • addNote

        public static de.elo.ix.client.Note[] addNote​(de.elo.ix.client.Note[] notes,
                                                      de.elo.ix.client.Note newNote)
                                               throws java.lang.Exception
        Fügt die Notiz in der angegebenen Liste mit Notizen ein und liefert die Liste zurück.
        Parameters:
        notes - Liste mit Notizen
        newNote - Neue Notiz
        Returns:
        Liste mit allen Notizen
        Throws:
        java.lang.Exception