Package com.nomagic.magicdraw.teamwork2
Interface ITeamworkService
-
- All Known Implementing Classes:
TeamworkService
@OpenApiAll public interface ITeamworkService
Interface for team server service
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
ESI_SERVICE
Identifier of ESI Server service
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.String
getConnectedUser()
Returns name of connected user .ServerLoginInfo
getLastUsedLoginInfo()
Returns list of input data, which was entered on last successful connection.ProjectDescriptor
getProjectDescriptorById(java.lang.String id)
Returns descriptor of project with given idProjectDescriptor
getProjectDescriptorByQualifiedName(java.lang.String qualifiedName)
Returns project descriptor.java.util.List<ProjectDescriptor>
getProjectDescriptors()
Collect information about all projects on serverjava.lang.String
getProjectIdByQualifiedName(java.lang.String qualifiedName)
Returns project id for given project qualified name.java.lang.String
getServiceID()
Return service id.IVersionDescriptor
getVersion(Project project)
Current versions of given projectjava.util.List<IVersionDescriptor>
getVersions(ProjectDescriptor descriptor)
Versions of given projectboolean
isConnected()
Returns true, when connection between MD and server is established.boolean
isLiveConnection()
Check if there is a live server connectionboolean
login(boolean useLastLoginData)
Logs into last successful server using last successful input data.void
login(ServerLoginInfo info, boolean encryptPassword)
Login with given databoolean
logout()
Logs out from server.void
setAsLastUsedService()
Set that current service is last used service to connect to server from MD.void
setLastUsedTeamworkInfo(ServerLoginInfo info, boolean encryptPassword)
Saves given input data, as last successful user connection info.
-
-
-
Field Detail
-
ESI_SERVICE
static final java.lang.String ESI_SERVICE
Identifier of ESI Server service- See Also:
getServiceID()
, Constant Field Values
-
-
Method Detail
-
getServiceID
@Nonnull java.lang.String getServiceID()
Return service id.- Returns:
- service id
-
isConnected
boolean isConnected()
Returns true, when connection between MD and server is established.- Returns:
- true, when user is connected to server.
-
isLiveConnection
boolean isLiveConnection()
Check if there is a live server connection- Returns:
- true if connection is live.
-
getConnectedUser
@CheckForNull java.lang.String getConnectedUser()
Returns name of connected user .- Returns:
- User name of connected user. Null when no user is connected.
-
login
boolean login(boolean useLastLoginData)
Logs into last successful server using last successful input data.- Parameters:
useLastLoginData
- true use last login data, false - specify new login data.- Returns:
- return true if log-in was successful.
- See Also:
setLastUsedTeamworkInfo(ServerLoginInfo, boolean)
-
login
void login(@Nonnull ServerLoginInfo info, boolean encryptPassword)
Login with given data- Parameters:
info
- login infoencryptPassword
- encrypt password from given info
-
logout
boolean logout()
Logs out from server.- Returns:
- True, when log out was successful.
-
setLastUsedTeamworkInfo
void setLastUsedTeamworkInfo(@Nonnull ServerLoginInfo info, boolean encryptPassword)
Saves given input data, as last successful user connection info.- Parameters:
info
- login infoencryptPassword
- encrypt password from given info
-
getLastUsedLoginInfo
ServerLoginInfo getLastUsedLoginInfo()
Returns list of input data, which was entered on last successful connection. Array of: login username, pass, servername.- Returns:
- array of username, pass, servername.
-
setAsLastUsedService
void setAsLastUsedService()
Set that current service is last used service to connect to server from MD.
-
getProjectDescriptors
java.util.List<ProjectDescriptor> getProjectDescriptors() throws java.lang.Exception
Collect information about all projects on server- Returns:
- descriptors of all projects
- Throws:
java.lang.Exception
- in case of some error
-
getProjectDescriptorById
ProjectDescriptor getProjectDescriptorById(java.lang.String id) throws java.lang.Exception
Returns descriptor of project with given id- Parameters:
id
- project id- Returns:
- descriptor
- Throws:
java.lang.Exception
- in case of some error
-
getProjectIdByQualifiedName
java.lang.String getProjectIdByQualifiedName(java.lang.String qualifiedName) throws java.lang.Exception
Returns project id for given project qualified name.- Parameters:
qualifiedName
- project qualified name, unique name constructed from project name and it's branches. Examples: "MyProject" with no branches = "MyProject" "MyProject" branch ["release"] = "MyProject##release" "MyProject" branch with subbranch ["release", "sp1"] = "MyProject##release##sp1"- Returns:
- project id.
- Throws:
java.lang.Exception
- in case of some error
-
getProjectDescriptorByQualifiedName
ProjectDescriptor getProjectDescriptorByQualifiedName(java.lang.String qualifiedName) throws java.lang.Exception
Returns project descriptor.- Parameters:
qualifiedName
- project qualified name, unique name constructed from project name and it's branches.E.g:
"MyProject" with no branches = "MyProject"
"MyProject" branch ["release"] = "MyProject##release"
"MyProject" branch with subbranch ["release", "sp1"] = "MyProject##release##sp1"- Returns:
- remote project descriptor
- Throws:
java.lang.Exception
- in case of some error
-
getVersions
java.util.List<IVersionDescriptor> getVersions(ProjectDescriptor descriptor) throws java.lang.Exception
Versions of given project- Parameters:
descriptor
- descriptor.- Returns:
- versions
- Throws:
java.lang.Exception
- in case of some error
-
getVersion
IVersionDescriptor getVersion(@Nonnull Project project)
Current versions of given project- Parameters:
project
- project- Returns:
- versions
-
-