Class LibraryFileValidator

java.lang.Object
com.e1c.g5.v8.dt.internal.library.ui.LibraryFileValidator
All Implemented Interfaces:
org.eclipse.core.databinding.validation.IValidator<String>
Direct Known Subclasses:
LibraryAlreadyAddedInRepositoryValidator

public class LibraryFileValidator extends Object implements org.eclipse.core.databinding.validation.IValidator<String>
The library file validator.
  • Constructor Details

    • LibraryFileValidator

      public LibraryFileValidator(org.eclipse.core.databinding.observable.value.IObservableValue<String> libraryNameObservableValue, org.eclipse.core.databinding.observable.value.IObservableValue<String> libraryVersionObservableValue, org.eclipse.core.databinding.observable.value.IObservableValue<String> libraryVendorObservableValue, org.eclipse.core.databinding.observable.value.IObservableValue<String> libraryRuntimeVersionObservableValue, ILibraryProjectManager libraryProjectManager)
      Creates a new instance.
      Parameters:
      libraryNameObservableValue - the library name observable value to fill, cannot be null
      libraryVersionObservableValue - the library version observable value to fill, cannot be null
      libraryVendorObservableValue - the library vendor observable value to fill, cannot be null
      libraryRuntimeVersionObservableValue - the library runtime version observable value to fill, cannot be null
      libraryProjectManager - the library project manager, cannot be null
  • Method Details

    • validate

      public org.eclipse.core.runtime.IStatus validate(String value)
      Specified by:
      validate in interface org.eclipse.core.databinding.validation.IValidator<String>
    • validateLibraryMetainformation

      protected org.eclipse.core.runtime.IStatus validateLibraryMetainformation(LibraryDescriptor libraryDescriptor)
      Validates the library metainformation. By default returns status Status#OK_STATUS.
      Parameters:
      libraryDescriptor - the library descriptor, cannot be null
      Returns:
      a status object indicating whether the validation succeeded Status#OK_STATUS or not, never null