org.apache.maven.scm.provider
Class ScmProviderRepository

java.lang.Object
  extended by org.apache.maven.scm.provider.ScmProviderRepository
Direct Known Subclasses:
ScmProviderRepositoryWithHost

public abstract class ScmProviderRepository
extends Object

Version:
$Id: ScmProviderRepository.java 922043 2010-03-11 22:30:56Z olamy $
Author:
Trygve Laugstøl, Emmanuel Venisse

Constructor Summary
ScmProviderRepository()
           
 
Method Summary
 ScmProviderRepository getParent()
          Get a ScmProviderRepository that represents the parent folder in the repository.
 String getPassword()
           
 String getRelativePath(ScmProviderRepository ancestor)
          Get the relative path between the repository provided as argument and the current repository.
 String getUser()
           
 boolean isPersistCheckout()
          Will checkouts using this repository be persisted so they can be refreshed in the future?
 boolean isPushChanges()
          Should distributed changes be pushed to the central repository?
 void setPassword(String password)
          Set the password.
 void setPersistCheckout(boolean persistCheckout)
           
 void setPushChanges(boolean pushChanges)
           
 void setUser(String user)
          Set the user.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ScmProviderRepository

public ScmProviderRepository()
Method Detail

getUser

public String getUser()
Returns:
The user.

setUser

public void setUser(String user)
Set the user.

Parameters:
user - The user

getPassword

public String getPassword()
Returns:
The password.

setPassword

public void setPassword(String password)
Set the password.

Parameters:
password - The user password

isPushChanges

public boolean isPushChanges()
Should distributed changes be pushed to the central repository? For many distributed SCMs like Git, a change like a commit is only stored in your local copy of the repository. Pushing the change allows your to more easily share it with other users.

Since:
1.4

setPushChanges

public void setPushChanges(boolean pushChanges)
Parameters:
pushChanges -
Since:
1.4

isPersistCheckout

public boolean isPersistCheckout()
Will checkouts using this repository be persisted so they can be refreshed in the future? This property is of concern to SCMs like Perforce and Clearcase where the server must track where a user checks out to. If false, the server entry (clientspec in Perforce terminology) will be deleted after the checkout is complete so the files will not be able to be updated.

This setting can be overriden by using the system property "maven.scm.persistcheckout" to true.

The default is false. See SCM-113 for more detail.


setPersistCheckout

public void setPersistCheckout(boolean persistCheckout)

getParent

public ScmProviderRepository getParent()
Get a ScmProviderRepository that represents the parent folder in the repository. Useful when the repository does not exist yet and we need to create it from the parent.

Returns:
the parent repository
Throws:
UnsupportedOperationException - unless overridden by subclass

getRelativePath

public String getRelativePath(ScmProviderRepository ancestor)
Get the relative path between the repository provided as argument and the current repository.

Parameters:
ancestor - another repository that should be ancestor of this one
Returns:
the relative path or null if it can't be resolved
Throws:
UnsupportedOperationException - unless overridden by subclass


Copyright © 2003-2012 The Apache Software Foundation. All Rights Reserved.