Class PlatformServicesUiFactory

java.lang.Object
com._1c.g5.v8.dt.platform.services.ui.PlatformServicesUiFactory

public class PlatformServicesUiFactory extends Object
Factory to create common platfom services UI controls. Factory allows to create:
  • Add 1C:Enterprise Runtime button
  • New infobase button
  • Infobase selection button
  • 1C:Enterprise Runtime installations viewer
  • Infobases viewer
Restriction:
This class is not intended to be sub-classed by clients.
Restriction:
This class is not intended to be instantiated by clients.
  • Constructor Details

    • PlatformServicesUiFactory

      public PlatformServicesUiFactory()
  • Method Details

    • createRuntimeInstallationsViewer

      public ComboViewer createRuntimeInstallationsViewer(org.eclipse.swt.widgets.Composite parent)
      Create 1C:Enterprise Runtime installation viewer. Viewer allows user to select necessary 1C:Enterprise Runtime installation of enterprise Runtime type.
      Parameters:
      parent - the parent composite, cannot be null
      Returns:
      the created viewer, never null
    • createRuntimeInstallationsViewer

      public ComboViewer createRuntimeInstallationsViewer(org.eclipse.swt.widgets.Composite parent, String runtimeTypeId)
      Create 1C:Enterprise Runtime installation viewer. Viewer allows user to select necessary 1C:Enterprise Runtime installation of the given Runtime type.
      Parameters:
      parent - the parent composite, cannot be null
      runtimeTypeId - the type of C:Enterprise Runtime, cannot be null
      Returns:
      the created viewer, never null
    • createRuntimeInstallationsViewer

      public ComboViewer createRuntimeInstallationsViewer(org.eclipse.swt.widgets.Composite parent, String runtimeTypeId, org.eclipse.core.resources.IProject project, InfobaseReference infobase, InfobaseAccessType accessType)
      Create 1C:Enterprise Runtime installation viewer. Viewer allows user to select necessary 1C:Enterprise Runtime installation of the given Runtime type.
      Parameters:
      parent - the parent composite, cannot be null
      runtimeTypeId - the type of C:Enterprise Runtime, cannot be null
      project - the project to get access settings for, cannot be null
      accessType - the infobase access type, cannot be null
      infobase - the infobase to get access settings for, cannot be null
      Returns:
      the created viewer, never null
    • createAddRuntimeButton

      public org.eclipse.swt.widgets.Button createAddRuntimeButton(org.eclipse.swt.widgets.Composite parent, ComboViewer installationsViewer)
      Create Add existing 1C:Enterprise Runtime installation button. Button will execute enterprise 1C:Enterprise Runtime wizard. Added 1C:Enterprise Runtime will be inserted and selected in the installation viewer.
      Parameters:
      parent - the parent composite, cannot be null
      installationsViewer - the target viewer to select created 1C:Enterprise Runtime installation, cannot be null
      Returns:
      the created button, never null
    • createAddRuntimeButton

      public org.eclipse.swt.widgets.Button createAddRuntimeButton(org.eclipse.swt.widgets.Composite parent, String runtimeTypeId, String wizardId, ComboViewer installationsViewer, ComboViewer projectsViewer, ComboViewer infobasesViewer, InfobaseAccessType accessType)
      Create Add existing 1C:Enterprise Runtime installation button. Button will execute the given type of 1C:Enterprise Runtime wizard. Added 1C:Enterprise Runtime will be inserted and selected in the installation viewer.
      Parameters:
      parent - the parent composite, cannot be null
      runtimeTypeId - the type of C:Enterprise Runtime, cannot be null
      wizardId - the wizard id to open with button selection, wizard must be instance of IRuntimeInstallationWizard, cannot be null
      installationsViewer - the target viewer to select created 1C:Enterprise Runtime installation, cannot be null
      projectsViewer - the projects viewer to get information about project, or null if none
      infobasesViewer - the infobases viewer to get information about infobase or null if none
      accessType - the infobase access type to add installation for or null if none
      Returns:
      the created button, never null
    • createAddRuntimeButton

      public org.eclipse.swt.widgets.Button createAddRuntimeButton(org.eclipse.swt.widgets.Composite parent, ComboViewer installationsViewer, org.eclipse.core.resources.IProject project, ComboViewer infobasesViewer)
      Create Add existing 1C:Enterprise Runtime installation button. Button will execute enterprise 1C:Enterprise Runtime wizard. Added 1C:Enterprise Runtime will be inserted and selected in the installation viewer.
      Parameters:
      parent - the parent composite, cannot be null
      installationsViewer - the target viewer to select created 1C:Enterprise Runtime installation, cannot be null
      Returns:
      the created button, never null
    • createAddRuntimeLwtButton

      public LightImageButton createAddRuntimeLwtButton(LightComboViewer viewer)
      Create Add existing 1C:Enterprise Runtime installation LWT button. Button will execute of 1C:Enterprise Runtime wizard. Added 1C:Enterprise Runtime will be inserted and selected in the installation viewer.
      Parameters:
      viewer - the parent LWT installation viewer, cannot be null
      Returns:
      the created button, never null
    • createInfobasesViewer

      public ComboViewer createInfobasesViewer(org.eclipse.swt.widgets.Composite parent)
      Create infobases viewer. Viewer allows user to select necessary infobase.
      Parameters:
      parent - the parent composite, cannot be null
      Returns:
      the created viewer, never null
    • createInfobasesViewer

      public ComboViewer createInfobasesViewer(org.eclipse.swt.widgets.Composite parent, Predicate<InfobaseReference> filter)
      Create infobases viewer. Viewer allows user to select necessary infobase. Clients may define filter to filter infobases input.
      Parameters:
      parent - the parent composite, cannot be null
      filter - the fileter to fileter infobases input or null if not needed
      Returns:
      the created viewer, never null
    • linkInfobaseViewerWithRuntimeInstallationsViewer

      public void linkInfobaseViewerWithRuntimeInstallationsViewer(ComboViewer infobasesViewer, ComboViewer installationsViewer, org.eclipse.swt.widgets.Text infobaseUser, org.eclipse.swt.widgets.Text infobasePassword, org.eclipse.swt.widgets.Text additionalParameters, org.eclipse.swt.widgets.Button osAuthentication, org.eclipse.swt.widgets.Button infobaseAuthentication, org.eclipse.core.resources.IProject project)
      Link infobase viewer selection with the 1C:Enterprise Runtime installation viewer selection. Selected infobase will trigger 1C:Enterprise Runtime installation and infobase user and password selection. Some UI constols may be missing.
      Parameters:
      infobasesViewer - the infobases viewer, cannot be null
      installationsViewer - the 1C:Enterprise Runtime installation viewer, or null of not needed
      infobaseUser - the infobase user text, or null of not needed
      infobasePassword - the infobase user password, or null of not needed
      additionalParameters - the infobase additional parameters, or null of not needed
      osAuthentication - the OS authentication button, or null of not needed
      infobaseAuthentication - the infobase OS authentication button, or null of not needed
      project - the project to use to link, cannot be null
    • selectInfobaseAccessSettings

      public boolean selectInfobaseAccessSettings(InfobaseReference infobase, InfobaseAccessType accessType, org.eclipse.core.resources.IProject project, ComboViewer installationsViewer, org.eclipse.swt.widgets.Text infobaseUser, org.eclipse.swt.widgets.Text infobasePassword, org.eclipse.swt.widgets.Text additionalParameters, org.eclipse.swt.widgets.Button osAuthentication, org.eclipse.swt.widgets.Button infobaseAuthentication)
      Trigger 1C:Enterprise Runtime installation and infobase userand password selection. Some UI constols may be missing.

      Returns wheter access user ant type settings was set during method execution.

      Parameters:
      infobase - the infobase to get access settings for, cannot be null
      accessType - the infobase access type, cannot be null
      project - the project to get access settings for, can be null if not needed
      installationsViewer - the 1C:Enterprise Runtime installation viewer, or null of not needed
      infobaseUser - the infobase user text, or null of not needed
      infobasePassword - the infobase user password, or null of not needed
      additionalParameters - the infobase additional parameters, or null of not needed
      osAuthentication - the OS authentication button, or null of not needed
      infobaseAuthentication - the infobase OS authentication button, or null of not needed
      Returns:
      wheter access user ant type settings was set during method execution
    • createNewInfobaseButton

      public org.eclipse.swt.widgets.Button createNewInfobaseButton(org.eclipse.swt.widgets.Composite parent)
      Create New infobase button. Button will execute infobase creation wizard. To add actual button selection action clients need to execute linkNewInfobaseButtionWithInfobasesViewer(Button, ComboViewer, ComboViewer).
      Parameters:
      parent - the parent composite, cannot be null
      Returns:
      the created button, never null
    • createNewInfobaseLwtButton

      public LightImageButton createNewInfobaseLwtButton(LightComboViewer infobasesViewer, LightComboViewer installationsViewer)
      Create New infobase LWT button. Button will execute infobase creation wizard.
      Parameters:
      installationViewer - target 1C:Enterprise Runtime installations viewer to select probably added 1C:Enterprise Runtime installation or null if not needed
      infobaseManager - the infobase manager, cannot be null
      Returns:
      the created button, never null
    • createSelectInfobaseButton

      public org.eclipse.swt.widgets.Button createSelectInfobaseButton(org.eclipse.swt.widgets.Composite parent, ComboViewer infobaseViewer)
      Create ... infobase selection button. Button will open tree infobase selection dialog.
      Parameters:
      parent - the parent composite, cannot be null
      infobaseViewer - the infobase viewer to get intitial selection from and to set dialog result to, cannot be null
      Returns:
      the created button, never null
    • createSelectInfobaseLWtButton

      public LightImageButton createSelectInfobaseLWtButton(LightComboViewer viewer)
      Create ... infobase selection LWT button. Button will open tree infobase selection dialog.
      Parameters:
      parent - the parent composite, cannot be null
      viewer - viewer the infobase LWT viewer to get intitial selection from and to set dialog result to, cannot be null
      Returns:
      the created button, never null
    • createInfobaseSettingsButton

      public org.eclipse.swt.widgets.Button createInfobaseSettingsButton(org.eclipse.swt.widgets.Composite parent, ComboViewer infobasesViewer)
      Create infobase Settings editing button. Button will show infobase settings editing dialog.
      Parameters:
      parent - the parent composite, cannot be null
      infobasesViewer - the target viewer to edit infobase settings from, cannot be null
      Returns:
      the created button, never null
    • createInfobaseSettingsButton

      public org.eclipse.swt.widgets.Button createInfobaseSettingsButton(org.eclipse.swt.widgets.Composite parent, InfobaseReference infobase, org.eclipse.core.resources.IProject project)
      Create infobase Settings editing button. Button will show infobase settings editing dialog.
      Parameters:
      parent - the parent composite, cannot be null
      infobase - the infobase to change infobase access settings, cannot be null
      project - the project to open infobase access settings for or null if not needed
      Returns:
      the created button, never null
    • createInfobaseSettingsLwtButton

      public LightImageButton createInfobaseSettingsLwtButton(LightComboViewer viewer)
      Create infobase Settings editing button. Button will show infobase settings editing dialog.
      Parameters:
      parent - the parent composite, cannot be null
      infobasesViewer - the target viewer to edit infobase settings from, cannot be null
      Returns:
      the created button, never null
    • createInfobaseSettingsLink

      public org.eclipse.swt.widgets.Link createInfobaseSettingsLink(org.eclipse.swt.widgets.Composite parent, ComboViewer infobasesViewer)
      Create infobase Settings editing link. Link will show infobase settings editing dialog.
      Parameters:
      parent - the parent composite, cannot be null
      infobasesViewer - the target viewer to edit infobase settings from, cannot be null
      Returns:
      the created link, never null
    • linkNewInfobaseButtionWithInfobasesViewer

      public void linkNewInfobaseButtionWithInfobasesViewer(org.eclipse.swt.widgets.Button newInfobase, ComboViewer infobasesViewer, ComboViewer installationsViewer)
      Link New indobase button with the infobase viewer selection. Created infobase will trigger infobase viewer selection. Possibly-added 1C:Enterprise Runtime installation will also be selected in the given 1C:Enterprise installation viewer.
      Parameters:
      newInfobase - the new infobase button, cannot be null
      infobasesViewer - the infobases viewer, cannot be null
      installationsViewer - the 1C:Enterprise installations viewer, or null if not needed
    • openInfobaseAccessSettingsDialog

      public void openInfobaseAccessSettingsDialog(org.eclipse.swt.widgets.Shell shell, StructuredViewer infobaseViewer, org.eclipse.core.resources.IProject project)
      Open infobase access settings dialog.
      Parameters:
      shell - the shell to use, cannot be null
      infobaseViewer - the infobase viewer to get editing infobase from, cannot be null
      project - the project to open infobase access settings for or null. Can be null if field for choosing runtime installation not needed
    • openInfobaseAccessSettingsDialog

      public void openInfobaseAccessSettingsDialog(org.eclipse.swt.widgets.Shell shell, InfobaseReference infobase, org.eclipse.core.resources.IProject project)
      Open infobase access settings dialog.
      Parameters:
      shell - the shell to use, cannot be null
      infobase - the infobase to change infobase access settings, cannot be null
      project - the project to open infobase access settings for or null. Can be null if field for choosing runtime installation not needed
    • updateInfobaseAccessSettings

      public IInfobaseAccessSettings updateInfobaseAccessSettings(org.eclipse.swt.widgets.Shell shell, InfobaseReference infobase, String requestMessage)
      Opens infobase access settings dialog and returns new access settings or null if canceled.
      Parameters:
      shell - the shell to use, cannot be null
      infobase - the infobase to change infobase access settings
      requestMessage - the request access message, if null then default dialog message used
      Returns:
      new IInfobaseAccessSettings if 'Ok' pressed, null otherwise
    • openDumpInfobaseWizard

      public int openDumpInfobaseWizard(org.eclipse.swt.widgets.Shell shell, InfobaseReference infobase, IResolvableRuntimeInstallation installation)
      Opens 1C:Enterprise infobase dump to .dt file wizard. Returns the wizard dialog return code.
      Parameters:
      shell - the shell to use, cannot be null
      infobase - the infobase to dump, cannot be null
      installation - the 1C:Enterprise platform installation to use, cannot be null
      Returns:
      the wizard dialog return code
    • openRestoreInfobaseWizard

      public int openRestoreInfobaseWizard(org.eclipse.swt.widgets.Shell shell, InfobaseReference infobase, IResolvableRuntimeInstallation installation)
      Opens 1C:Enterprise infobase restore from .dt file wizard. Returns the wizard dialog return code.
      Parameters:
      shell - the shell to use, cannot be null
      infobase - the infobase to dump, cannot be null
      installation - the 1C:Enterprise platform installation to use, cannot be null
      Returns:
      the wizard dialog return code
    • openExportConfigurationFileWizard

      public int openExportConfigurationFileWizard(org.eclipse.swt.widgets.Shell shell, InfobaseReference infobase, IResolvableRuntimeInstallation installation)
      Opens 1C:Enterprise infobase export to .cf|.cfe file wizard. Returns the wizard dialog return code.
      Parameters:
      shell - the shell to use, cannot be null
      infobase - the infobase to export to file, cannot be null
      installation - the 1C:Enterprise platform installation to use, cannot be null
      Returns:
      the wizard dialog return code
    • createUserListButton

      public org.eclipse.swt.widgets.Button createUserListButton(org.eclipse.swt.widgets.Composite parent, Supplier<Object> selectionSupplier)
      Creates 'Users' standard data processor command open button.
      Parameters:
      parent - parent composite, cannot be null
      selectionSupplier - the selection supplier with (IApplication or InfobaseReference) type, cannot be null