Class ImportBehavior


  • public final class ImportBehavior
    extends java.lang.Object
    Utility class defining specific, configurable import behavior. A given implementation of the ProtectedItemImporter may support this as part of the overall import configuration.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static int ABORT
      Aborts the import as soon as invalid values are detected throwing a ConstraintViolationException.
      static int BESTEFFORT
      Same as IGNORE but in addition tries to circumvent the problem.
      static int IGNORE
      If a value cannot be set due to constraints enforced by the API implementation, the failure is logged as warning and the value is ignored.
      static java.lang.String NAME_ABORT  
      static java.lang.String NAME_BESTEFFORT  
      static java.lang.String NAME_IGNORE  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static @NotNull java.lang.String nameFromValue​(int importBehavior)  
      static int valueFromString​(@NotNull java.lang.String behaviorString)  
      • Methods inherited from class java.lang.Object

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

      • IGNORE

        public static final int IGNORE
        If a value cannot be set due to constraints enforced by the API implementation, the failure is logged as warning and the value is ignored.
        See Also:
        Constant Field Values
      • BESTEFFORT

        public static final int BESTEFFORT
        Same as IGNORE but in addition tries to circumvent the problem. This option should only be used with validated and trusted XML passed to the Session and Workspace import API.
        See Also:
        Constant Field Values
      • ABORT

        public static final int ABORT
        Aborts the import as soon as invalid values are detected throwing a ConstraintViolationException.
        See Also:
        Constant Field Values
    • Method Detail

      • valueFromString

        public static int valueFromString​(@NotNull
                                          @NotNull java.lang.String behaviorString)
      • nameFromValue

        @NotNull
        public static @NotNull java.lang.String nameFromValue​(int importBehavior)