mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-13 00:45:44 +01:00
use person class for author parameter
This commit is contained in:
@@ -33,13 +33,16 @@ package sonia.scm.repository.client.api;
|
||||
|
||||
//~--- non-JDK imports --------------------------------------------------------
|
||||
|
||||
import java.io.IOException;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import sonia.scm.repository.client.spi.AddCommand;
|
||||
import sonia.scm.util.Util;
|
||||
|
||||
//~--- JDK imports ------------------------------------------------------------
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Sebastian Sdorra
|
||||
@@ -78,6 +81,8 @@ public final class AddCommandBuilder
|
||||
* @param pathes
|
||||
*
|
||||
* @return
|
||||
*
|
||||
* @throws IOException
|
||||
*/
|
||||
public AddCommandBuilder add(String path, String... pathes) throws IOException
|
||||
{
|
||||
@@ -99,6 +104,8 @@ public final class AddCommandBuilder
|
||||
*
|
||||
*
|
||||
* @param path
|
||||
*
|
||||
* @throws IOException
|
||||
*/
|
||||
private void add(String path) throws IOException
|
||||
{
|
||||
|
||||
@@ -33,12 +33,15 @@ package sonia.scm.repository.client.api;
|
||||
|
||||
//~--- non-JDK imports --------------------------------------------------------
|
||||
|
||||
import java.io.IOException;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import sonia.scm.repository.client.spi.BranchCommand;
|
||||
|
||||
//~--- JDK imports ------------------------------------------------------------
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Sebastian Sdorra
|
||||
@@ -75,6 +78,8 @@ public final class BranchCommandBuilder
|
||||
* @param name
|
||||
*
|
||||
* @return
|
||||
*
|
||||
* @throws IOException
|
||||
*/
|
||||
public BranchCommandBuilder branch(String name) throws IOException
|
||||
{
|
||||
|
||||
@@ -26,6 +26,9 @@
|
||||
* http://bitbucket.org/sdorra/scm-manager
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
|
||||
package sonia.scm.repository.client.api;
|
||||
|
||||
/**
|
||||
|
||||
@@ -34,15 +34,19 @@ package sonia.scm.repository.client.api;
|
||||
//~--- non-JDK imports --------------------------------------------------------
|
||||
|
||||
import com.google.common.collect.Lists;
|
||||
import java.io.IOException;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import sonia.scm.repository.Changeset;
|
||||
import sonia.scm.repository.Person;
|
||||
import sonia.scm.repository.client.spi.CommitCommand;
|
||||
import sonia.scm.repository.client.spi.CommitRequest;
|
||||
|
||||
//~--- JDK imports ------------------------------------------------------------
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Sebastian Sdorra
|
||||
@@ -97,8 +101,10 @@ public final class CommitCommandBuilder
|
||||
* @param message
|
||||
*
|
||||
* @return
|
||||
*
|
||||
* @throws IOException
|
||||
*/
|
||||
public Changeset commit(String author, String message) throws IOException
|
||||
public Changeset commit(Person author, String message) throws IOException
|
||||
{
|
||||
request.setAuthor(author);
|
||||
request.setMessage(message);
|
||||
|
||||
@@ -33,12 +33,15 @@ package sonia.scm.repository.client.api;
|
||||
|
||||
//~--- non-JDK imports --------------------------------------------------------
|
||||
|
||||
import java.io.IOException;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import sonia.scm.repository.client.spi.PushCommand;
|
||||
|
||||
//~--- JDK imports ------------------------------------------------------------
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Sebastian Sdorra
|
||||
@@ -71,6 +74,8 @@ public final class PushCommandBuilder
|
||||
/**
|
||||
* Method description
|
||||
*
|
||||
*
|
||||
* @throws IOException
|
||||
*/
|
||||
public void push() throws IOException
|
||||
{
|
||||
|
||||
@@ -33,13 +33,16 @@ package sonia.scm.repository.client.api;
|
||||
|
||||
//~--- non-JDK imports --------------------------------------------------------
|
||||
|
||||
import java.io.IOException;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import sonia.scm.repository.client.spi.RemoveCommand;
|
||||
import sonia.scm.util.Util;
|
||||
|
||||
//~--- JDK imports ------------------------------------------------------------
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Sebastian Sdorra
|
||||
@@ -78,8 +81,11 @@ public final class RemoveCommandBuilder
|
||||
* @param pathes
|
||||
*
|
||||
* @return
|
||||
*
|
||||
* @throws IOException
|
||||
*/
|
||||
public RemoveCommandBuilder remove(String path, String... pathes) throws IOException
|
||||
public RemoveCommandBuilder remove(String path, String... pathes)
|
||||
throws IOException
|
||||
{
|
||||
remove(path);
|
||||
|
||||
@@ -99,6 +105,8 @@ public final class RemoveCommandBuilder
|
||||
*
|
||||
*
|
||||
* @param path
|
||||
*
|
||||
* @throws IOException
|
||||
*/
|
||||
private void remove(String path) throws IOException
|
||||
{
|
||||
|
||||
@@ -69,6 +69,8 @@ public final class RepositoryClientFactory
|
||||
* @param workingCopy
|
||||
*
|
||||
* @return
|
||||
*
|
||||
* @throws IOException
|
||||
*/
|
||||
public RepositoryClient create(File main, File workingCopy) throws IOException
|
||||
{
|
||||
@@ -86,9 +88,12 @@ public final class RepositoryClientFactory
|
||||
* @param workingCopy
|
||||
*
|
||||
* @return
|
||||
*
|
||||
* @throws IOException
|
||||
*/
|
||||
public RepositoryClient create(String url, String username, String password,
|
||||
File workingCopy) throws IOException
|
||||
File workingCopy)
|
||||
throws IOException
|
||||
{
|
||||
return new RepositoryClient(provider.create(url, username, password,
|
||||
workingCopy));
|
||||
|
||||
@@ -33,7 +33,6 @@ package sonia.scm.repository.client.api;
|
||||
|
||||
//~--- non-JDK imports --------------------------------------------------------
|
||||
|
||||
import java.io.IOException;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
@@ -41,6 +40,10 @@ import sonia.scm.repository.Tag;
|
||||
import sonia.scm.repository.client.spi.TagCommand;
|
||||
import sonia.scm.repository.client.spi.TagRequest;
|
||||
|
||||
//~--- JDK imports ------------------------------------------------------------
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Sebastian Sdorra
|
||||
@@ -77,6 +80,8 @@ public final class TagCommandBuilder
|
||||
* @param name
|
||||
*
|
||||
* @return
|
||||
*
|
||||
* @throws IOException
|
||||
*/
|
||||
public Tag tag(String name) throws IOException
|
||||
{
|
||||
|
||||
@@ -31,6 +31,8 @@
|
||||
|
||||
package sonia.scm.repository.client.spi;
|
||||
|
||||
//~--- JDK imports ------------------------------------------------------------
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
/**
|
||||
@@ -48,6 +50,8 @@ public interface AddCommand
|
||||
* @param path
|
||||
*
|
||||
* @param file
|
||||
*
|
||||
* @throws IOException
|
||||
*/
|
||||
public void add(String path) throws IOException;
|
||||
}
|
||||
|
||||
@@ -26,11 +26,19 @@
|
||||
* http://bitbucket.org/sdorra/scm-manager
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
|
||||
package sonia.scm.repository.client.spi;
|
||||
|
||||
import java.io.IOException;
|
||||
//~--- non-JDK imports --------------------------------------------------------
|
||||
|
||||
import sonia.scm.repository.Branch;
|
||||
|
||||
//~--- JDK imports ------------------------------------------------------------
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Sebastian Sdorra
|
||||
@@ -38,5 +46,16 @@ import sonia.scm.repository.Branch;
|
||||
*/
|
||||
public interface BranchCommand
|
||||
{
|
||||
|
||||
/**
|
||||
* Method description
|
||||
*
|
||||
*
|
||||
* @param name
|
||||
*
|
||||
* @return
|
||||
*
|
||||
* @throws IOException
|
||||
*/
|
||||
public Branch branch(String name) throws IOException;
|
||||
}
|
||||
|
||||
@@ -33,9 +33,12 @@ package sonia.scm.repository.client.spi;
|
||||
|
||||
//~--- non-JDK imports --------------------------------------------------------
|
||||
|
||||
import java.io.IOException;
|
||||
import sonia.scm.repository.Changeset;
|
||||
|
||||
//~--- JDK imports ------------------------------------------------------------
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Sebastian Sdorra
|
||||
@@ -51,6 +54,8 @@ public interface CommitCommand
|
||||
* @param request
|
||||
*
|
||||
* @return
|
||||
*
|
||||
* @throws IOException
|
||||
*/
|
||||
public Changeset commit(CommitRequest request) throws IOException;
|
||||
}
|
||||
|
||||
@@ -35,6 +35,8 @@ package sonia.scm.repository.client.spi;
|
||||
|
||||
import com.google.common.base.Objects;
|
||||
|
||||
import sonia.scm.repository.Person;
|
||||
|
||||
//~--- JDK imports ------------------------------------------------------------
|
||||
|
||||
import java.util.List;
|
||||
@@ -125,7 +127,7 @@ public final class CommitRequest
|
||||
*
|
||||
* @param author
|
||||
*/
|
||||
public void setAuthor(String author)
|
||||
public void setAuthor(Person author)
|
||||
{
|
||||
this.author = author;
|
||||
}
|
||||
@@ -162,7 +164,7 @@ public final class CommitRequest
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
String getAuthor()
|
||||
Person getAuthor()
|
||||
{
|
||||
return author;
|
||||
}
|
||||
@@ -192,7 +194,7 @@ public final class CommitRequest
|
||||
//~--- fields ---------------------------------------------------------------
|
||||
|
||||
/** Field description */
|
||||
private String author;
|
||||
private Person author;
|
||||
|
||||
/** Field description */
|
||||
private String message;
|
||||
|
||||
@@ -31,6 +31,8 @@
|
||||
|
||||
package sonia.scm.repository.client.spi;
|
||||
|
||||
//~--- JDK imports ------------------------------------------------------------
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
/**
|
||||
@@ -44,6 +46,8 @@ public interface PushCommand
|
||||
/**
|
||||
* Method description
|
||||
*
|
||||
*
|
||||
* @throws IOException
|
||||
*/
|
||||
public void push() throws IOException;
|
||||
}
|
||||
|
||||
@@ -31,6 +31,8 @@
|
||||
|
||||
package sonia.scm.repository.client.spi;
|
||||
|
||||
//~--- JDK imports ------------------------------------------------------------
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
/**
|
||||
@@ -48,6 +50,8 @@ public interface RemoveCommand
|
||||
* @param file
|
||||
*
|
||||
* @param path
|
||||
*
|
||||
* @throws IOException
|
||||
*/
|
||||
public void remove(String path) throws IOException;
|
||||
}
|
||||
|
||||
@@ -52,8 +52,11 @@ public interface RepositoryClientFactoryProvider
|
||||
* @param workingCopy
|
||||
*
|
||||
* @return
|
||||
*
|
||||
* @throws IOException
|
||||
*/
|
||||
public RepositoryClientProvider create(File main, File workingCopy) throws IOException;
|
||||
public RepositoryClientProvider create(File main, File workingCopy)
|
||||
throws IOException;
|
||||
|
||||
/**
|
||||
* Method description
|
||||
@@ -65,7 +68,10 @@ public interface RepositoryClientFactoryProvider
|
||||
* @param workingCopy
|
||||
*
|
||||
* @return
|
||||
*
|
||||
* @throws IOException
|
||||
*/
|
||||
public RepositoryClientProvider create(String url, String username,
|
||||
String password, File workingCopy) throws IOException;
|
||||
String password, File workingCopy)
|
||||
throws IOException;
|
||||
}
|
||||
|
||||
@@ -33,9 +33,12 @@ package sonia.scm.repository.client.spi;
|
||||
|
||||
//~--- non-JDK imports --------------------------------------------------------
|
||||
|
||||
import java.io.IOException;
|
||||
import sonia.scm.repository.Tag;
|
||||
|
||||
//~--- JDK imports ------------------------------------------------------------
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Sebastian Sdorra
|
||||
@@ -51,6 +54,8 @@ public interface TagCommand
|
||||
* @param request
|
||||
*
|
||||
* @return
|
||||
*
|
||||
* @throws IOException
|
||||
*/
|
||||
public Tag tag(TagRequest request) throws IOException;
|
||||
}
|
||||
|
||||
@@ -82,6 +82,16 @@ public final class TagRequest
|
||||
return Objects.hashCode(revision, name);
|
||||
}
|
||||
|
||||
/**
|
||||
* Method description
|
||||
*
|
||||
*/
|
||||
public void reset()
|
||||
{
|
||||
this.name = null;
|
||||
this.revision = null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Method description
|
||||
*
|
||||
@@ -99,35 +109,6 @@ public final class TagRequest
|
||||
//J+
|
||||
}
|
||||
|
||||
public void reset(){
|
||||
this.name = null;
|
||||
this.revision = null;
|
||||
}
|
||||
|
||||
//~--- get methods ----------------------------------------------------------
|
||||
|
||||
/**
|
||||
* Method description
|
||||
*
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
String getName()
|
||||
{
|
||||
return name;
|
||||
}
|
||||
|
||||
/**
|
||||
* Method description
|
||||
*
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
String getRevision()
|
||||
{
|
||||
return revision;
|
||||
}
|
||||
|
||||
//~--- set methods ----------------------------------------------------------
|
||||
|
||||
/**
|
||||
@@ -152,6 +133,30 @@ public final class TagRequest
|
||||
this.revision = revision;
|
||||
}
|
||||
|
||||
//~--- get methods ----------------------------------------------------------
|
||||
|
||||
/**
|
||||
* Method description
|
||||
*
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
String getName()
|
||||
{
|
||||
return name;
|
||||
}
|
||||
|
||||
/**
|
||||
* Method description
|
||||
*
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
String getRevision()
|
||||
{
|
||||
return revision;
|
||||
}
|
||||
|
||||
//~--- fields ---------------------------------------------------------------
|
||||
|
||||
/** Field description */
|
||||
|
||||
Reference in New Issue
Block a user