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, updateTimeSpent
protected 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()
TaskRepository
initializeRepository
in class TaskRepository
public void storeCredentials()
protected CredentialAttributes getAttributes()
public abstract BaseRepository clone()
clone
in class TaskRepository
public boolean equals(java.lang.Object o)
equals
in class TaskRepository
public 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)
TaskRepository
setPreferredOpenTaskState
in class TaskRepository
public CustomTaskState getPreferredOpenTaskState()
TaskRepository
getPreferredOpenTaskState
in class TaskRepository
public void setPreferredCloseTaskState(CustomTaskState state)
TaskRepository
setPreferredCloseTaskState
in class TaskRepository
public CustomTaskState getPreferredCloseTaskState()
TaskRepository
getPreferredCloseTaskState
in class TaskRepository
public java.lang.String extractId(java.lang.String taskName)
TaskRepository
null
,
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 TaskRepository
taskName
- 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 TaskRepository
protected java.lang.String getDefaultScheme()