Class LockCommand

  • All Implemented Interfaces:
    ExecutableCommand

    public class LockCommand
    extends ExecutableCommandWrapper
    implements ExecutableCommand

    Locks a document Item for editing. Locking a document for editing prevents others from editing particular fields of that document.

    This command requires PTC Integrity 10.6 or higher.

    Notes:

    • You can lock a document as an individual or for a group that you belong to. When no groupName option is specified, lock command assumes that you are attempting to lock the document for the current user. To successfully lock a document, the administrator must have defined the document type as one which uses locking and you must meet the criteria set by the administrator as to who is eligible to lock documents of that type.
    • The administrator also defines which fields in a given document type (and its content items) are protected by locking. These are called lockable fields.The list of lockable fields for any given document type always includes, at a minimum, the significant fields for that type.
    • Locking is not recursive. When you lock a document, only that document is locked. Subdocuments of that document are not locked.
    • You can lock a document as either an individual user or as a group. When a document is locked by an individual user, only that user can edit the lockable fields of that document. When a document is locked by a group, only members of that group can edit those fields.

    Usage:

     new LockCommand(myItem).execute();
     new LockCommand(myItem, groupName).execute();
     
    Since:
    1.9.2
    • Constructor Detail

      • LockCommand

        public LockCommand​(Item item,
                           String groupName)
        Instantiates a command to lock a Document Item.
        Parameters:
        item - the Document item to lock.
        groupName - The user group allow to edit the Document.
      • LockCommand

        public LockCommand​(Item item)
        Instantiates a command to lock a Document Item.
        Parameters:
        item - the Document item to lock.