Class LegacyDesktopIdGenerator

  • All Implemented Interfaces:, IdGenerator

    public class LegacyDesktopIdGenerator
    extends java.lang.Object
    implements IdGenerator,
    A legacy sequential desktop ID generator used in ZK before 9.6.0. The result is like z_1ym6 or _ga6b.

    To use this Id Generator, add system-config in zk.xml.

    See Also:
    Serialized Form
    • Constructor Detail

      • LegacyDesktopIdGenerator

        public LegacyDesktopIdGenerator()
    • Method Detail

      • nextDesktopId

        public java.lang.String nextDesktopId​(Desktop desktop)
        Description copied from interface: IdGenerator
        Returns the next desktop ID for the specified desktop, or null to generate the default ID.

        Default (if null is returned): ID is generated randomly. In other words, the desktop's ID, by default, is not deterministic. To have a deterministic value, you have to implement this method.

        Notice that UUID cannot be empty and can only have alphanumeric characters or underscore (i.e., a-z, A-Z, 0-9, and _).

        Also notice that we can retrieve the execution by use of Desktop.getExecution(), or Executions.getCurrent().

        Specified by:
        nextDesktopId in interface IdGenerator
        the next desktop ID, or null to generate the default ID.