public abstract class BaseRepository extends TaskRepository
TaskRepository.CancellableConnection| Modifier and Type | Field and Description |
|---|---|
protected boolean |
myLoginAnonymously |
protected java.lang.String |
myPassword |
protected CustomTaskState |
myPreferredCloseTaskState |
protected CustomTaskState |
myPreferredOpenTaskState |
protected boolean |
myUseHttpAuthentication |
protected boolean |
myUseProxy |
protected java.lang.String |
myUsername |
BASIC_HTTP_AUTHORIZATION, LOGIN_ANONYMOUSLY, myCommitMessageFormat, myShouldFormatCommitMessage, NATIVE_SEARCH, NO_FEATURES, STATE_UPDATING, TIME_MANAGEMENT, TIME_SPENT_PATTERN| Constructor and Description |
|---|
BaseRepository() |
BaseRepository(BaseRepository other) |
BaseRepository(TaskRepositoryType type) |
| Modifier and Type | Method and Description |
|---|---|
abstract BaseRepository |
clone() |
boolean |
equals(java.lang.Object o) |
java.lang.String |
extractId(java.lang.String taskName)
Attempts to extract server ID of the issue from the ID of local task (probably restored from project settings).
|
protected CredentialAttributes |
getAttributes() |
protected java.lang.String |
getDefaultScheme() |
java.lang.String |
getEncodedPassword() |
java.lang.String |
getPassword() |
CustomTaskState |
getPreferredCloseTaskState()
Task state that was used last time when closing task.
|
CustomTaskState |
getPreferredOpenTaskState()
Task state that was used last time when opening task.
|
java.lang.String |
getUsername() |
void |
initializeRepository()
This is invoked right after setting state.
|
boolean |
isLoginAnonymously() |
boolean |
isUseHttpAuthentication() |
boolean |
isUseProxy() |
void |
setEncodedPassword(java.lang.String password) |
void |
setLoginAnonymously(boolean loginAnonymously) |
void |
setPassword(java.lang.String password) |
void |
setPreferredCloseTaskState(CustomTaskState state)
Remember state used when closing task most recently.
|
void |
setPreferredOpenTaskState(CustomTaskState state)
Remember state used when opening task most recently.
|
void |
setUrl(java.lang.String url) |
void |
setUseHttpAuthentication(boolean useHttpAuthentication) |
void |
setUseProxy(boolean useProxy) |
void |
setUsername(java.lang.String username) |
void |
storeCredentials() |
createCancellableConnection, findTask, getAvailableTaskStates, getComment, getCommitMessageFormat, getFeatures, getIcon, getIssues, getIssues, getIssues, getPresentableName, getRepositoryType, getTaskComment, getUrl, isConfigured, isShared, isShouldFormatCommitMessage, isSupported, setCommitMessageFormat, setRepositoryType, setShared, setShouldFormatCommitMessage, setTaskState, setTaskState, testConnection, toString, updateTimeSpentprotected java.lang.String myUsername
protected java.lang.String myPassword
protected boolean myUseProxy
protected boolean myUseHttpAuthentication
protected boolean myLoginAnonymously
protected CustomTaskState myPreferredOpenTaskState
protected CustomTaskState myPreferredCloseTaskState
public BaseRepository(TaskRepositoryType type)
public BaseRepository(BaseRepository other)
public BaseRepository()
public void setUsername(java.lang.String username)
public void setPassword(java.lang.String password)
public java.lang.String getUsername()
public java.lang.String getPassword()
public java.lang.String getEncodedPassword()
public void setEncodedPassword(java.lang.String password)
public void initializeRepository()
TaskRepositoryinitializeRepository in class TaskRepositorypublic void storeCredentials()
protected CredentialAttributes getAttributes()
public abstract BaseRepository clone()
clone in class TaskRepositorypublic boolean equals(java.lang.Object o)
equals in class TaskRepositorypublic boolean isUseProxy()
public void setUseProxy(boolean useProxy)
public boolean isUseHttpAuthentication()
public void setUseHttpAuthentication(boolean useHttpAuthentication)
public boolean isLoginAnonymously()
public void setLoginAnonymously(boolean loginAnonymously)
public void setPreferredOpenTaskState(CustomTaskState state)
TaskRepositorysetPreferredOpenTaskState in class TaskRepositorypublic CustomTaskState getPreferredOpenTaskState()
TaskRepositorygetPreferredOpenTaskState in class TaskRepositorypublic void setPreferredCloseTaskState(CustomTaskState state)
TaskRepositorysetPreferredCloseTaskState in class TaskRepositorypublic CustomTaskState getPreferredCloseTaskState()
TaskRepositorygetPreferredCloseTaskState in class TaskRepositorypublic java.lang.String extractId(java.lang.String taskName)
TaskRepositorynull,
this repository is attached to that local task and is used then to refresh it via TaskRepository.findTask(String),
update its state via TaskRepository.setTaskState(Task, CustomTaskState), etc. Because the decision is based only on syntactic
structure of ID, this approach works poorly in case of several repositories with similar issue IDs, e.g. JIRA and YouTrack,
and so it's a subject of change in future.extractId in class TaskRepositorytaskName - ID of the task to checknull if it doesn't look like issue ID of this trackerpublic void setUrl(java.lang.String url)
setUrl in class TaskRepositoryprotected java.lang.String getDefaultScheme()