Class LockSpec

    • Constructor Detail

      • LockSpec

        public LockSpec()
    • Method Detail

      • unlock

        public void unlock​(AdaptationHome aDataSpace,
                           Session aSession)
                    throws OperationException
        Unlocks the specified dataspace.

        If the dataspace is already unlocked, this method throws an exception.

        When dataspace is locked, a user can unlock it if:

        • The user is the owner of the lock,
        • The user is a "super owner" of the dataspace (see permissions),
        • The user is an administrator,
        • The LockSpec instance is in a setOwnerPrivileges(boolean) mode.

        And if:

        • The means used to unlock the dataspace is the same as that used to lock it That is, if it was locked through the user interface, the user interface must also be used to unlock it, or
        • The LockSpec instance is in a setIgnoreLockReason(boolean) mode.

        Note:

        • This method cannot be called inside a procedure execution (because of transaction management restrictions).
        • If a parent or child dataspace of the current dataspace has also been locked (for instance, during a merge procedure), only the current dataspace will be unlocked. Another LockSpec will have to be created to unlock the other dataspace.
        Throws:
        OperationException
        See Also:
        SessionPermissions.getHomeActionPermissionToUnlockHome(LockSpec, AdaptationHome)
      • setDescription

        public void setDescription​(UserMessage description)
        Specifies a message describing the the context or reason for the lock.

        This localized message is displayed in the EBX® user interface when the user accesses a dataspace that is locked.

      • setChildBranchCreationAllowed

        public void setChildBranchCreationAllowed​(boolean childBranchCreationAllowed)
        Declares that it is possible to create a child dataspace when set to true. Default value is false.
      • isChildBranchCreationAllowed

        public boolean isChildBranchCreationAllowed()
      • setOwnerPrivileges

        public void setOwnerPrivileges​(boolean allPrivileges)
        If true, assumes the current user is either the owner of the dataspace or the owner of the lock (when unlocking).
      • setIgnoreLockReason

        public void setIgnoreLockReason​(boolean ignoreLockReason)
        If true, when unlocking, the initial means of the locking is ignored.