Class IJCCoreUtils


  • public final class IJCCoreUtils
    extends java.lang.Object
    TODO: Javadoc.
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  IJCCoreUtils.PrintUtilities
      Purpose of this class is to be used for getting the print settings that should be shared for all prints in IJC.
    • Method Summary

      All Methods Static Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      static void annotateException​(java.lang.Throwable t, java.lang.String localizedMessage)  
      static void applyChangesWithProgress​(com.im.commons.ui.beans.DFCustomizer customizer)  
      static void applyChangesWithProgress​(com.im.commons.ui.beans.DFCustomizer customizer, java.lang.String progressName, java.lang.String errorMsg)  
      static java.lang.String checkProjectProtocol​(java.lang.String urif)
      Check if URL is using our private project: protocol.
      static void closeOpenedViews​(java.lang.Iterable<? extends com.im.df.api.ddl.DFDataTree> dataTrees)
      Closes opened views in given dataTrees.
      static com.im.df.api.dml.DFResultSet.VertexState computeCommonVS​(IJCWidgetCookie widgetCookie)
      Deprecated.
      will be removed after IJC 5.12 version.
      static com.im.df.api.dml.DFResultSet.VertexState computeCommonVS​(IJCWidget widget)
      Deprecated.
      will be removed after IJC 5.12 version.
      static java.util.List<com.im.df.api.ddl.DFField> computeFields​(IJCWidgetCookie widgetCookie, boolean bindOrSelected, boolean onlyIfAllInOneEntity)
      static java.util.List<com.im.df.api.ddl.DFField> computeFields​(IJCWidget widget, boolean bindOrSelected, boolean onlyIfAllInOneEntity)
      TODO P1 - fix this method to take array of IJCWidget Compute the union of all fields from the widget.
      static java.awt.Dimension computeTextComponentSize​(javax.swing.text.JTextComponent comp)
      Computes preferred size of JTextComponent according to text content and current width.
      static java.util.List<? extends java.lang.Object> convertListValues​(com.im.df.api.ddl.DFField sourceField, com.im.df.api.ddl.DFField targetField, java.util.List<? extends java.lang.Object> sourceValues, boolean forceValidation, com.im.commons.progress.DFEnvironmentRO env)
      Deprecated.
      Deprecated since 6.2.
      static NewDFItemWizardIterator<com.im.df.api.ddl.DFEntity> createNewEntityWizard​(com.im.df.api.ddl.DFSchema ijcSchema, java.util.List<com.im.df.api.support.DFNewType<com.im.df.api.ddl.DFEntity>> newtypes, boolean createDataTree, boolean createView, org.openide.WizardDescriptor.Panel<org.openide.WizardDescriptor> extraPanel, java.awt.Dimension size)
      Creates a new DFEntity, based on the newtypes passed.
      static SchemaSelector createSchemaSelector​(boolean selectOnlyWriteableSchema)
      Creates a default implementation of SchemaSelector.
      static java.lang.String createWrappedText​(java.lang.String text, java.lang.String wrapSymbol, int limitInPixel, java.awt.FontMetrics fm)
      Text will be formatted so that the string would be smart-wrapped to fit the multi-line text area.
      static void deleteDataFromSelection​(IJCWidgetCookie widgetCookie, boolean delOrCut)  
      static void deleteDataFromSelection​(IJCWidget widget, boolean delOrCut)  
      static javax.swing.Action findActionFromLayer​(java.lang.String resourceName)  
      static java.util.List<com.im.df.api.dml.DFResultSet> findActiveResultSetsFor​(com.im.df.api.ddl.DFEntity entity)
      Find all active result sets where the given entity participates in.
      static java.util.List<com.im.df.api.ddl.DFEntity> findEntities​(org.openide.nodes.Node[] activatedNodes)  
      static java.util.List<com.im.df.api.ddl.DFField> findFields​(org.openide.nodes.Node[] activatedNodes)  
      static com.im.df.api.support.DFNewType<com.im.df.api.ddl.DFList> findNewListNT​(com.im.df.api.ddl.DFEntity entity)  
      static com.im.df.api.support.DFNewType<com.im.df.api.ddl.DFQuery> findNewQueryNT​(com.im.df.api.ddl.DFDataTree dataTree)  
      static java.lang.String findProjectPath​(com.im.df.api.ddl.DFSchema schema)  
      static java.util.List<com.im.df.api.ddl.DFRelationship> findRelationships​(org.openide.nodes.Node[] activatedNodes)  
      static java.lang.String findSelectedProjectPath()  
      static AbstractViewTopComponent findTopComponent​(org.openide.nodes.Node[] nodes)
      Finds AbstractViewTopComponent shared by all nodes.
      static java.util.Set<com.chemaxon.ijc.commons.datarequest.api.FieldReference> findUsedFields​(com.im.df.api.ddl.DFView view)
      Finds all fields used in the given view.
      static com.im.df.api.dml.DFResultSet.VertexState findVertexState​(org.openide.nodes.Node[] nodes)
      Computes the VertexState common for all nodes.
      static void fixSharing​(com.im.df.api.ddl.DFView view, java.util.List<? extends com.im.df.api.ddl.DFItem> flds)
      Upgrades the sharing privileges of fields to the view level.
      static java.lang.String formatStringForHtmlOutput​(java.lang.String text)
      Given text will be formated so as it could be displayed in HTML format.
      static java.lang.String generateNewListName()
      Generates default list name based on current date-time pattern.
      static java.util.List<? extends java.lang.Comparable<?>> getAssociatedIDs​(com.im.df.api.support.SelectionDescription selection, com.im.df.api.dml.DFResultSet.VertexState vs)
      Returns list of IDs (primary key values) for the given selection.
      static char[] getBreakChars()  
      static java.awt.Image getIconResource​(com.im.df.api.ddl.DFItem item, int iconType)  
      static java.awt.Image getIconResource​(java.lang.Class<?> clazz, int iconType)  
      static java.lang.String getNameWithOwner​(com.im.df.api.ddl.DFUserItem item, java.lang.Class<?> sourceClass, java.lang.String keyOwner, java.lang.String keyOther)  
      static java.util.Comparator<org.openide.nodes.Node> getNodeComparator​(boolean ascending)  
      static java.util.List<? extends com.im.df.api.dml.DFResultSet.VertexState> getParentN1or11VertexStates​(com.im.df.api.dml.DFResultSet.VertexState vertexState)
      Goes up the tree from given vertexState to furthest predecessor where parent-child relationship is N:1 or 1:1, and returns all vertex states as a list.
      static java.lang.Object[] getValuesFromExpression​(com.im.df.api.dml.DFTermExpression expr)
      Unwrap the values objects from list of operands.
      static boolean isItemSharable​(com.im.df.api.ddl.DFView view, com.im.df.api.ddl.DFItem item)
      Checks weather the item has at least the same sharing level so it will be visible to all users who can see the view.
      static boolean isJavaWebstart()
      Check if IJC is running from java webstart.
      static boolean isViewSharable​(com.im.df.api.ddl.DFView view, com.im.commons.sharing.DFSharing newSharing)
      Checks weather all fields bound to the view's widgets are shared with given sharing level.
      static javax.swing.Action[] loadActionsForNode​(java.lang.String key, javax.swing.Action[] addBefore, javax.swing.Action[] addAfter)
      Load actions from layer.
      static void openView​(com.im.df.api.ddl.DFDataTree dataTree, org.openide.nodes.Node[] activatedNodes)
      Opens a view for DFDataTree.
      static void reloadDataInResultSetsFor​(com.im.df.api.ddl.DFEntity entity, boolean askUser)
      This method first finds all active result sets where the given entity participates in.
      static void selectInProjects​(com.im.df.api.ddl.DFDataTree item, boolean selectIt)
      Expand the node for the given dataTree in "Projects explorer".
      static void selectInProjects​(com.im.df.api.ddl.DFSchema item, boolean selectIt)
      Expand the node for the given schema in "Projects explorer".
      static void selectInProjects​(com.im.df.api.ddl.DFScript item, boolean selectIt)
      Expand the node for the given script in "Projects explorer".
      static void selectInProjects​(com.im.df.api.ddl.DFView item, boolean selectIt)
      Expand the node for the given view in "Projects explorer".
      static void selectInProjects​(org.openide.loaders.DataObject dobj, boolean selectIt)
      Expand the node for the given connection (schema) in "Projects explorer".
      static void setNewSelection​(com.im.df.api.dml.DFResultSet.VertexState vertexState, int delta)
      Set new selection on background.
      static void setNewSelection​(com.im.df.api.dml.DFResultSet.VertexState vertexState, com.im.df.api.support.SelectionDescription selection)
      Set new selection on background.
      static void setNewSelection​(com.im.df.api.dml.DFResultSet.VertexState vertexState, com.im.df.api.support.SelectionDescription selection, boolean synchronously)
      Deprecated.
      The synchronous selection update is not reliable.
      static com.im.commons.progress.Task setSort​(com.im.df.api.dml.DFResultSet.VertexState vertexState, com.im.df.api.support.SortDirective sort)
      Performs sort upon given vertexState and all corresponding vertex states retrieved via getParentN1or11VertexStates(com.im.df.api.dml.DFResultSet.VertexState) and getChildN1or11VertexStates(com.im.df.api.dml.DFResultSet.VertexState).
      static boolean showLicenseExpiredDialog​(java.lang.Throwable exception)  
      static boolean showLicenseExpiredDialog​(java.lang.Throwable exception, boolean showEveryTime)
      If the license or it cause is License exception it will show dialog with license excpetion.
      static void switchAllOpenedViewsMode​(com.im.df.api.ddl.DFDataTree dt, ViewMode viewMode)  
      static com.im.df.api.chem.MarvinStructure tryToGetStructureOperand​(com.im.df.api.dml.DFTermExpression expr, boolean returnEmptyStructureInsteadOfNull)
      Try to get MarvinStructure operand from the expression.
      • Methods inherited from class java.lang.Object

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

      • applyChangesWithProgress

        public static void applyChangesWithProgress​(com.im.commons.ui.beans.DFCustomizer customizer)
      • applyChangesWithProgress

        public static void applyChangesWithProgress​(com.im.commons.ui.beans.DFCustomizer customizer,
                                                    java.lang.String progressName,
                                                    java.lang.String errorMsg)
      • createSchemaSelector

        public static SchemaSelector createSchemaSelector​(boolean selectOnlyWriteableSchema)
        Creates a default implementation of SchemaSelector.
      • getIconResource

        public static java.awt.Image getIconResource​(com.im.df.api.ddl.DFItem item,
                                                     int iconType)
      • getIconResource

        public static java.awt.Image getIconResource​(java.lang.Class<?> clazz,
                                                     int iconType)
      • setNewSelection

        public static void setNewSelection​(com.im.df.api.dml.DFResultSet.VertexState vertexState,
                                           com.im.df.api.support.SelectionDescription selection)
        Set new selection on background.
        Parameters:
        vertexState - vertex state whose selection will be updated
        selection - the new selection
      • setNewSelection

        public static void setNewSelection​(com.im.df.api.dml.DFResultSet.VertexState vertexState,
                                           int delta)
        Set new selection on background.
        Parameters:
        vertexState - vertex state whose selection will be updated
        delta - how many rows should the selection move
      • setNewSelection

        @Deprecated
        public static void setNewSelection​(com.im.df.api.dml.DFResultSet.VertexState vertexState,
                                           com.im.df.api.support.SelectionDescription selection,
                                           boolean synchronously)
        Deprecated.
        The synchronous selection update is not reliable. If there are already queued updates, the method may wait only for the previous update. Moreover, there is no guarantee of the state of DFResultSet.VertexState when this method finishes. If there is another updater scheduled after this one, you may see the other task already performed. The synchronous update is "best effort". It will work well in an uncontended environment but you shouldn't rely on it.
        Set selection in vertexState and wail till selection is done.
        Parameters:
        vertexState - working vertexState
        selection - new selection
        synchronously - it will wail till selection is done if it's true (see deprecation).
      • getAssociatedIDs

        public static java.util.List<? extends java.lang.Comparable<?>> getAssociatedIDs​(com.im.df.api.support.SelectionDescription selection,
                                                                                         com.im.df.api.dml.DFResultSet.VertexState vs)
        Returns list of IDs (primary key values) for the given selection.
        Parameters:
        selection - selected indexes
        vs - associated VertexState
        Returns:
        list of IDs
      • openView

        public static void openView​(com.im.df.api.ddl.DFDataTree dataTree,
                                    org.openide.nodes.Node[] activatedNodes)
        Opens a view for DFDataTree. If there is more the one view in the DFDataTree, user is asked to choose which view to open.
        Parameters:
        dataTree -
        activatedNodes -
      • getParentN1or11VertexStates

        public static java.util.List<? extends com.im.df.api.dml.DFResultSet.VertexState> getParentN1or11VertexStates​(com.im.df.api.dml.DFResultSet.VertexState vertexState)
        Goes up the tree from given vertexState to furthest predecessor where parent-child relationship is N:1 or 1:1, and returns all vertex states as a list.
        Parameters:
        vertexState - current vertex state
        Returns:
        list of vertex states where first belongs to closest parent DFDataTree.Vertex and last one to the furthest predecessor. List does not include given vertexState.
      • findSelectedProjectPath

        public static java.lang.String findSelectedProjectPath()
      • findProjectPath

        public static java.lang.String findProjectPath​(com.im.df.api.ddl.DFSchema schema)
      • deleteDataFromSelection

        public static void deleteDataFromSelection​(IJCWidgetCookie widgetCookie,
                                                   boolean delOrCut)
      • deleteDataFromSelection

        public static void deleteDataFromSelection​(IJCWidget widget,
                                                   boolean delOrCut)
      • computeCommonVS

        @Deprecated
        public static com.im.df.api.dml.DFResultSet.VertexState computeCommonVS​(IJCWidgetCookie widgetCookie)
        Deprecated.
        will be removed after IJC 5.12 version. Use IJCWidget.getVertexState() instead.
      • computeCommonVS

        @Deprecated
        public static com.im.df.api.dml.DFResultSet.VertexState computeCommonVS​(IJCWidget widget)
        Deprecated.
        will be removed after IJC 5.12 version. Use IJCWidget.getVertexState() instead.
      • findTopComponent

        public static AbstractViewTopComponent findTopComponent​(org.openide.nodes.Node[] nodes)
        Finds AbstractViewTopComponent shared by all nodes.
        Parameters:
        nodes - The nodes to search in.
        Returns:
        The AbstractViewTopComponent or null.
        Since:
        15.11.9
      • findVertexState

        public static com.im.df.api.dml.DFResultSet.VertexState findVertexState​(org.openide.nodes.Node[] nodes)
        Computes the VertexState common for all nodes. Returns some non-null value only if at least one widget has specified VertexState and all nodes have the same VertexState. This method uses VertexStateCookie and IJCWidgetCookie for obtaining the VertexState.
        Parameters:
        nodes - The nodes where you are looking for the common vertex state
        Returns:
        The common VertexState or null
      • computeFields

        public static java.util.List<com.im.df.api.ddl.DFField> computeFields​(IJCWidget widget,
                                                                              boolean bindOrSelected,
                                                                              boolean onlyIfAllInOneEntity)
        TODO P1 - fix this method to take array of IJCWidget Compute the union of all fields from the widget.
        Parameters:
        widget - the widget to be used
        bindOrSelected - If true bound fields are computed, if false then only selected fields
        onlyIfAllInOneEntity - If false then it requires all fields must be from the same entity (VertexState). If there are widgets which are bound to fields from different entity and this parameter is true, the method will return empty list.
        Returns:
        The union of all fields. Each field is there only once.
      • isItemSharable

        public static boolean isItemSharable​(com.im.df.api.ddl.DFView view,
                                             com.im.df.api.ddl.DFItem item)
        Checks weather the item has at least the same sharing level so it will be visible to all users who can see the view.
        Parameters:
        view -
        item -
        Returns:
      • isViewSharable

        public static boolean isViewSharable​(com.im.df.api.ddl.DFView view,
                                             com.im.commons.sharing.DFSharing newSharing)
        Checks weather all fields bound to the view's widgets are shared with given sharing level.
        Parameters:
        view - View to check
        newSharing - required level of sharing
        Returns:
      • findUsedFields

        public static java.util.Set<com.chemaxon.ijc.commons.datarequest.api.FieldReference> findUsedFields​(com.im.df.api.ddl.DFView view)
        Finds all fields used in the given view.
        Parameters:
        view -
        Returns:
        Set of used fields
      • fixSharing

        public static void fixSharing​(com.im.df.api.ddl.DFView view,
                                      java.util.List<? extends com.im.df.api.ddl.DFItem> flds)
        Upgrades the sharing privileges of fields to the view level.
        Parameters:
        view - view
        flds - fields to upgrade privileges
      • computeTextComponentSize

        public static java.awt.Dimension computeTextComponentSize​(javax.swing.text.JTextComponent comp)
        Computes preferred size of JTextComponent according to text content and current width.
        Parameters:
        comp -
        Returns:
        preferred size of component
      • closeOpenedViews

        public static void closeOpenedViews​(java.lang.Iterable<? extends com.im.df.api.ddl.DFDataTree> dataTrees)
        Closes opened views in given dataTrees. Must be called in EDT thread
        Parameters:
        dataTrees - data trees where to close views
        Since:
        20.20.0
      • findEntities

        public static java.util.List<com.im.df.api.ddl.DFEntity> findEntities​(org.openide.nodes.Node[] activatedNodes)
      • findRelationships

        public static java.util.List<com.im.df.api.ddl.DFRelationship> findRelationships​(org.openide.nodes.Node[] activatedNodes)
      • annotateException

        public static void annotateException​(java.lang.Throwable t,
                                             java.lang.String localizedMessage)
      • findFields

        public static java.util.List<com.im.df.api.ddl.DFField> findFields​(org.openide.nodes.Node[] activatedNodes)
      • getNodeComparator

        public static java.util.Comparator<org.openide.nodes.Node> getNodeComparator​(boolean ascending)
      • findActiveResultSetsFor

        public static java.util.List<com.im.df.api.dml.DFResultSet> findActiveResultSetsFor​(com.im.df.api.ddl.DFEntity entity)
        Find all active result sets where the given entity participates in.
        Parameters:
        entity - The entity
        Returns:
        The list of result sets
      • reloadDataInResultSetsFor

        public static void reloadDataInResultSetsFor​(com.im.df.api.ddl.DFEntity entity,
                                                     boolean askUser)
        This method first finds all active result sets where the given entity participates in. Then reload data in all of them on background. It can be used by import for example, because data in all opened views should be reloaded when import is finished. Otherwise result sets are not reloaded and won't contain the newly imported rows.
        Parameters:
        entity - The entity which was updated
      • selectInProjects

        public static void selectInProjects​(com.im.df.api.ddl.DFSchema item,
                                            boolean selectIt)
        Expand the node for the given schema in "Projects explorer".
        Parameters:
        item - The schema to shown in explorer
        selectIt - Selects the node in explorer (if false the node is just expanded).
      • selectInProjects

        public static void selectInProjects​(com.im.df.api.ddl.DFDataTree item,
                                            boolean selectIt)
        Expand the node for the given dataTree in "Projects explorer".
        Parameters:
        item - The d atatree to shown in explorer
        selectIt - Selects the node in explorer (if false the node is just expanded).
      • selectInProjects

        public static void selectInProjects​(com.im.df.api.ddl.DFScript item,
                                            boolean selectIt)
        Expand the node for the given script in "Projects explorer".
        Parameters:
        item - The script to shown in explorer
        selectIt - Selects the node in explorer (if false the node is just expanded).
      • selectInProjects

        public static void selectInProjects​(com.im.df.api.ddl.DFView item,
                                            boolean selectIt)
        Expand the node for the given view in "Projects explorer".
        Parameters:
        item - The v iew to shown in explorer
        selectIt - Selects the node in explorer (if false the node is just expanded).
      • selectInProjects

        public static void selectInProjects​(org.openide.loaders.DataObject dobj,
                                            boolean selectIt)
        Expand the node for the given connection (schema) in "Projects explorer".
        Parameters:
        dobj - The dataobject to shown in explorer. It must be some dataobject directly under project node e.g. SchemaConnectionDataObject.
        selectIt - Selects the node in explorer (if false the node is just expanded).
      • createNewEntityWizard

        public static NewDFItemWizardIterator<com.im.df.api.ddl.DFEntity> createNewEntityWizard​(com.im.df.api.ddl.DFSchema ijcSchema,
                                                                                                java.util.List<com.im.df.api.support.DFNewType<com.im.df.api.ddl.DFEntity>> newtypes,
                                                                                                boolean createDataTree,
                                                                                                boolean createView,
                                                                                                org.openide.WizardDescriptor.Panel<org.openide.WizardDescriptor> extraPanel,
                                                                                                java.awt.Dimension size)
        Creates a new DFEntity, based on the newtypes passed. Displays Wizard UI for setting up the entity. After the entity is created, a default DataTree is created for it with an initial View.

        The function returns the Wizard iterator so you can wait on the task finish.

        Caution - when the Creation task finishes, the datatree and view might not be yet created.

        Parameters:
        ijcSchema - The target Schema
        newtypes - The applicable NewTypes
        Returns:
        The WizardIterator creating the entity.
      • formatStringForHtmlOutput

        public static java.lang.String formatStringForHtmlOutput​(java.lang.String text)
        Given text will be formated so as it could be displayed in HTML format.
      • getBreakChars

        public static char[] getBreakChars()
        Returns:
        array of characters defining suitable places to break text in text components.
      • createWrappedText

        public static java.lang.String createWrappedText​(java.lang.String text,
                                                         java.lang.String wrapSymbol,
                                                         int limitInPixel,
                                                         java.awt.FontMetrics fm)
        Text will be formatted so that the string would be smart-wrapped to fit the multi-line text area.
      • switchAllOpenedViewsMode

        public static void switchAllOpenedViewsMode​(com.im.df.api.ddl.DFDataTree dt,
                                                    ViewMode viewMode)
      • getValuesFromExpression

        public static java.lang.Object[] getValuesFromExpression​(com.im.df.api.dml.DFTermExpression expr)
        Unwrap the values objects from list of operands. It is expected that the first operand is the field (DFTermField) so this method returns only values from 2nd, 3rd, ... operand. If there is any operand (except the first one representing field) which is not instance of DFTermValue this method throws IllegalArgumentException!

        The reason of this method is that if you want to create new DFTermExpression using DFTermsFactory methods you need to put there List of values and not List of DFTermValue objects. This method makes this common code simpler.

        Parameters:
        expr - The expression to be
        Returns:
        The values of the DFTermValues as an array
      • tryToGetStructureOperand

        public static com.im.df.api.chem.MarvinStructure tryToGetStructureOperand​(com.im.df.api.dml.DFTermExpression expr,
                                                                                  boolean returnEmptyStructureInsteadOfNull)
        Try to get MarvinStructure operand from the expression. It is expected that structure is 2nd operand (the 1st one if the field). The second operand must be of DFTermValue type and the value itself must be MarvinStructure instance. Otherwise returns null (but see the second method parameter!)
        Parameters:
        expr - The structure expression.
        returnEmptyStructureInsteadOfNull - If structure is not found should the method return a new empty instance of MarvinStructure instead of null?
        Returns:
        MarvinStructure or null. If returnEmptyStructureInsteadOfNull, the method never returns null.
      • findActionFromLayer

        public static javax.swing.Action findActionFromLayer​(java.lang.String resourceName)
      • showLicenseExpiredDialog

        public static boolean showLicenseExpiredDialog​(java.lang.Throwable exception,
                                                       boolean showEveryTime)
        If the license or it cause is License exception it will show dialog with license excpetion.
        Parameters:
        exception - The attached exception
        showEveryTime - true for ignoring delay if dialog has been already shown
        Returns:
        true if LicenseException was found
      • showLicenseExpiredDialog

        public static boolean showLicenseExpiredDialog​(java.lang.Throwable exception)
      • generateNewListName

        public static java.lang.String generateNewListName()
        Generates default list name based on current date-time pattern. E.g. "2021-08-20 12:55"
        Returns:
        The new list name
      • loadActionsForNode

        public static javax.swing.Action[] loadActionsForNode​(java.lang.String key,
                                                              javax.swing.Action[] addBefore,
                                                              javax.swing.Action[] addAfter)
        Load actions from layer. Actions are are expected in folder IJC/UI/Nodes/{nameOfThisNodeUsecase}
        Parameters:
        key - The name of folder under IJC/UI/Nodes for example "EntityInSchemaEditor"
        addBefore - Add these actions before actions loaded from layer
        addAfter - Add these actions after actions loaded from layer
        Returns:
        The complete array of actions
      • isJavaWebstart

        public static boolean isJavaWebstart()
        Check if IJC is running from java webstart.
        Returns:
        True on javaWebstart
      • checkProjectProtocol

        public static java.lang.String checkProjectProtocol​(java.lang.String urif)
        Check if URL is using our private project: protocol.
        Parameters:
        urif - URL string
        Returns:
        The urif or URL string without project: protocol, prefixed with project path
      • convertListValues

        @Deprecated
        public static java.util.List<? extends java.lang.Object> convertListValues​(com.im.df.api.ddl.DFField sourceField,
                                                                                   com.im.df.api.ddl.DFField targetField,
                                                                                   java.util.List<? extends java.lang.Object> sourceValues,
                                                                                   boolean forceValidation,
                                                                                   com.im.commons.progress.DFEnvironmentRO env)
        Deprecated.
        Deprecated since 6.2. Use DFLists#convertListValues.

        Convert list of values of sourceField to values for targetField.

        Parameters:
        sourceField - Source field whose values are going to be converted
        targetField - Field whose values are expected as result of this method
        sourceValues - Values of sourceField
        forceValidation - When true then this operation is going to SELECT database even when source and target field is the same. In other words it does validation and filters out non-existing values. When false this returns sourceValues if sourceValues == targetField.
        env - Environment for monitoring progress
        Returns:
        The converted list values, never returns null
      • findNewListNT

        public static com.im.df.api.support.DFNewType<com.im.df.api.ddl.DFList> findNewListNT​(com.im.df.api.ddl.DFEntity entity)
      • findNewQueryNT

        public static com.im.df.api.support.DFNewType<com.im.df.api.ddl.DFQuery> findNewQueryNT​(com.im.df.api.ddl.DFDataTree dataTree)
      • getNameWithOwner

        public static java.lang.String getNameWithOwner​(com.im.df.api.ddl.DFUserItem item,
                                                        java.lang.Class<?> sourceClass,
                                                        java.lang.String keyOwner,
                                                        java.lang.String keyOther)
        Parameters:
        item -
        keyOwner - - message key for the text that should appear if the item is owned by the current user
        keyOther - - message key for the text that should appear if the item belongs to another user
        sourceClass - - the class to use to locate the bundle for the messages
        Returns:
        formatted string with item name and owner
        Since:
        19.27.0