@OpenApiAll public abstract class TeamworkService extends java.lang.Object implements ITeamworkService
CAMEOSERVER_SERVICE, ESI_SERVICE, TEAMWORK_SERVICE
Constructor and Description |
---|
TeamworkService() |
Modifier and Type | Method and Description |
---|---|
static ITeamworkService |
getActiveInstance()
Returns active server service, according to current connected state.
|
static ITeamworkService |
getInstance(Project project)
Returns server service, according to current project.
|
static ITeamworkService |
getInstance(java.lang.String id)
Return instance by service id.
|
ServerLoginInfo |
getLastUsedLoginInfo()
Returns list of input data, which was entered on last successful connection.
|
protected com.nomagic.magicdraw.core.options.TeamworkOptionsGroup |
getTeamworkOptions() |
IVersionDescriptor |
getVersion(Project project)
Current versions of given project
|
boolean |
login(boolean useLastLoginData)
Logs into last successful server using last successful input data.
|
void |
login(ServerLoginInfo info,
boolean encryptPassword)
Login with given data
|
protected abstract boolean |
loginFromOptions(java.util.Map<?,?> options,
ProgressStatus status)
Logs into last successful server using last successful input data.
|
protected boolean |
loginOnTask(java.util.Map<?,?> options) |
boolean |
loginOnTask(java.util.Map<?,?> options,
java.util.function.Consumer<Task> taskRunner) |
static ITeamworkService |
setActiveInstance(ITeamworkService activeTeamworkService)
Set active Teamwork Service instance.
|
void |
setLastUsedTeamworkInfo(ServerLoginInfo info,
boolean encryptPassword)
Saves given input data, as last successful user connection info.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getConnectedUser, getProjectDescriptorById, getProjectDescriptorByQualifiedName, getProjectDescriptors, getProjectIdByQualifiedName, getServiceID, getVersions, isConnected, isLiveConnection, logout, setAsLastUsedService
@Nonnull public static ITeamworkService getInstance(@Nonnull java.lang.String id)
id
- service id@CheckForNull public static ITeamworkService setActiveInstance(@CheckForNull ITeamworkService activeTeamworkService)
activeTeamworkService
- active service@CheckForNull public static ITeamworkService getActiveInstance()
@CheckForNull public static ITeamworkService getInstance(Project project)
project
- projectpublic final boolean login(boolean useLastLoginData)
ITeamworkService
login
in interface ITeamworkService
useLastLoginData
- true use last login data, false - specify new login data.ITeamworkService.setLastUsedTeamworkInfo(ServerLoginInfo, boolean)
protected boolean loginOnTask(@CheckForNull java.util.Map<?,?> options)
public boolean loginOnTask(@CheckForNull java.util.Map<?,?> options, java.util.function.Consumer<Task> taskRunner)
protected abstract boolean loginFromOptions(@CheckForNull java.util.Map<?,?> options, ProgressStatus status)
options
- options.status
- progress statusprotected com.nomagic.magicdraw.core.options.TeamworkOptionsGroup getTeamworkOptions()
public void login(@Nonnull ServerLoginInfo info, boolean encryptPassword)
ITeamworkService
login
in interface ITeamworkService
info
- login infoencryptPassword
- encrypt password from given infopublic void setLastUsedTeamworkInfo(@Nonnull ServerLoginInfo info, boolean encryptPassword)
ITeamworkService
setLastUsedTeamworkInfo
in interface ITeamworkService
info
- login infoencryptPassword
- encrypt password from given infopublic ServerLoginInfo getLastUsedLoginInfo()
ITeamworkService
getLastUsedLoginInfo
in interface ITeamworkService
public IVersionDescriptor getVersion(@Nonnull Project project)
ITeamworkService
getVersion
in interface ITeamworkService
project
- project