public class HTTPRemoteRepository extends java.lang.Object implements IRemoteRepository2
IRemoteRepository2.BadRepositoryException, IRemoteRepository2.NetworkException
Constructor and Description |
---|
HTTPRemoteRepository() |
Modifier and Type | Method and Description |
---|---|
void |
addForCommit(java.lang.String path)
Add the specified file in preparation for commit (e.g.
|
void |
addForDeletion(java.lang.String path)
remove the specified file in preparation for commit (e.g.
|
java.lang.String |
commit(java.lang.String[] onVersions,
java.lang.String comment)
Commit to repository after specified version, or after any version if 'null' specified.
|
java.lang.String |
getFileVersion(java.lang.String file)
Use SHA-1 as file version.
|
java.io.File |
getLocalDirectory()
Return directory where this repo is in.
|
java.lang.String[] |
getRecentlyDeletedFiles()
Returns a list of files or directories (empty or not) that have been deleted since the last call to this function,
relative to the repository root that has been checked out.
|
void |
init(RepositoryDefinition repo,
java.io.File dir,
ProjectTeamSettings teamSettings)
Initialize repository provider.
|
protected java.util.Properties |
loadETags()
Load all ETags.
|
protected void |
retrieve(java.util.Properties etags,
java.lang.String file,
java.lang.String url,
java.io.File out)
Retrieve remote URL with non-modified checking by ETag.
|
protected void |
saveETags(java.util.Properties props)
Save all ETags.
|
void |
switchToVersion(java.lang.String version) |
public void init(RepositoryDefinition repo, java.io.File dir, ProjectTeamSettings teamSettings) throws java.lang.Exception
IRemoteRepository2
init
in interface IRemoteRepository2
repo
- repository description instancedir
- directory for store filesteamSettings
- team settings object for projectjava.lang.Exception
public java.lang.String getFileVersion(java.lang.String file) throws java.lang.Exception
getFileVersion
in interface IRemoteRepository2
java.lang.Exception
public void switchToVersion(java.lang.String version) throws java.lang.Exception
switchToVersion
in interface IRemoteRepository2
java.lang.Exception
public void addForCommit(java.lang.String path) throws java.lang.Exception
IRemoteRepository2
git add
, svn add
).addForCommit
in interface IRemoteRepository2
path
- The relative path of the item from the root of the repo
(should not start with a /
)java.lang.Exception
public void addForDeletion(java.lang.String path) throws java.lang.Exception
IRemoteRepository2
git rm
, svn delete
).addForDeletion
in interface IRemoteRepository2
path
- The relative path of the item from the root of the repo
(should not start with a /
)java.lang.Exception
public java.io.File getLocalDirectory()
IRemoteRepository2
getLocalDirectory
in interface IRemoteRepository2
public java.lang.String[] getRecentlyDeletedFiles() throws java.lang.Exception
IRemoteRepository2
getRecentlyDeletedFiles
in interface IRemoteRepository2
java.lang.Exception
public java.lang.String commit(java.lang.String[] onVersions, java.lang.String comment) throws java.lang.Exception
IRemoteRepository2
commit
in interface IRemoteRepository2
onVersions
- if version defined, then commit must be just after this version. Otherwise(if remote repository was
updated after rebase), commit shouldn't be processed and should return null. If version is null, then
commit can be after any version, i.e. previous version shouldn't be checked. It can be several
versions defined since glossary will be committed after project_save.tmx.comment
- comment for commitjava.lang.Exception
protected java.util.Properties loadETags() throws java.lang.Exception
java.lang.Exception
protected void saveETags(java.util.Properties props) throws java.lang.Exception
java.lang.Exception
protected void retrieve(java.util.Properties etags, java.lang.String file, java.lang.String url, java.io.File out) throws java.lang.Exception
java.lang.Exception