Class CommandLinePasswordManager
- java.lang.Object
-
- com.nomagic.magicdraw.teamwork2.esi.protect.CommandLinePasswordManager
-
- All Implemented Interfaces:
com.nomagic.magicdraw.teamwork2.esi.protect.PasswordManager
@OpenApiAll public class CommandLinePasswordManager extends java.lang.Object implements com.nomagic.magicdraw.teamwork2.esi.protect.PasswordManager
Password manager implementation for command line utilities
-
-
Field Summary
Fields Modifier and Type Field Description protected com.nomagic.ci.persistence.ProjectDescriptor
descriptor
private com.nomagic.magicdraw.teamwork2.esi.protect.PasswordCheckingImpl
implementation
-
Constructor Summary
Constructors Constructor Description CommandLinePasswordManager(com.nomagic.ci.persistence.ProjectDescriptor descriptor, com.nomagic.magicdraw.teamwork2.esi.protect.PasswordCheckingImpl implementation)
Creates and initializes a newAbstractPasswordManager
from specified parameters.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
askPasswordIfProtected()
boolean
isProtected()
Checks whether the project is password protected.boolean
isValidPassword(char[] password)
-
-
-
Constructor Detail
-
CommandLinePasswordManager
public CommandLinePasswordManager(com.nomagic.ci.persistence.ProjectDescriptor descriptor, com.nomagic.magicdraw.teamwork2.esi.protect.PasswordCheckingImpl implementation)
Creates and initializes a newAbstractPasswordManager
from specified parameters.- Parameters:
descriptor
- a project descriptor.implementation
- password checking implementation.
-
-
Method Detail
-
askPasswordIfProtected
public boolean askPasswordIfProtected()
- Specified by:
askPasswordIfProtected
in interfacecom.nomagic.magicdraw.teamwork2.esi.protect.PasswordManager
-
isProtected
public boolean isProtected() throws com.nomagic.magicdraw.teamwork2.esi.protect.PasswordProtectException
Checks whether the project is password protected.- Specified by:
isProtected
in interfacecom.nomagic.magicdraw.teamwork2.esi.protect.PasswordManager
- Returns:
- true if the project is password protected, otherwise - false.
- Throws:
com.nomagic.magicdraw.teamwork2.esi.protect.PasswordProtectException
- if checking fails.
-
isValidPassword
public boolean isValidPassword(char[] password) throws com.nomagic.magicdraw.teamwork2.esi.protect.PasswordProtectException
- Specified by:
isValidPassword
in interfacecom.nomagic.magicdraw.teamwork2.esi.protect.PasswordManager
- Throws:
com.nomagic.magicdraw.teamwork2.esi.protect.PasswordProtectException
-
-