1. Sebastian Sdorra
  2. scm-manager

Commits

Sebastian Sdorra  committed 765afae

added some javadoc

  • Participants
  • Parent commits 18f799a
  • Branches default

Comments (0)

Files changed (8)

File scm-core/src/main/java/sonia/scm/repository/Changeset.java

View file
 import javax.xml.bind.annotation.XmlRootElement;
 
 /**
+ * Represents a changeset/commit of a repository.
  *
  * @author Sebastian Sdorra
  */
   //~--- constructors ---------------------------------------------------------
 
   /**
-   * Constructs ...
+   * Constructs a new instance of changeset.
    *
    */
   public Changeset() {}
 
   /**
-   * Constructs ...
+   * Constructs a new instance of changeset.
    *
    *
-   * @param id
-   * @param date
-   * @param author
+   * @param id id of the changeset
+   * @param date date of the changeset
+   * @param author author of the changeset
    */
   public Changeset(String id, Long date, Person author)
   {
   }
 
   /**
-   * Constructs ...
+   * Constructs a new instance of changeset.
    *
    *
-   * @param id
-   * @param date
-   * @param author
-   * @param description
+   * @param id id of the changeset
+   * @param date date of the changeset
+   * @param author author of the changeset
+   * @param description description of the changeset
    */
   public Changeset(String id, Long date, Person author, String description)
   {
   }
 
   /**
-   * Method description
+   * {@inheritDoc}
    *
    *
    * @return
   //~--- get methods ----------------------------------------------------------
 
   /**
-   * Method description
+   * Returns the author of the changeset.
    *
    *
-   * @return
+   * @return author of the changeset
    */
   public Person getAuthor()
   {
   }
 
   /**
-   * Method description
+   * Returns the branches of the changeset.
    *
    *
-   * @return
+   * @return branches of the changeset
    */
   public List<String> getBranches()
   {
   }
 
   /**
-   * Method description
+   * Returns the creation date of the changeset.
    *
    *
-   * @return
+   * @return date of the changeset
    */
   public Long getDate()
   {
   }
 
   /**
-   * Method description
+   * Return the description (commit message) of the changeset.
    *
    *
-   * @return
+   * @return description of the changeset
    */
   public String getDescription()
   {
   }
 
   /**
-   * Method description
+   * Returns the id of the changeset.
    *
    *
-   * @return
+   * @return id of the changeset
    */
   public String getId()
   {
   }
 
   /**
-   * Method description
+   * Returns the file modifications, which was done with this changeset.
    *
    *
-   * @return
+   * @return file modifications
    */
   public Modifications getModifications()
   {
   }
 
   /**
-   * Method description
+   * Return the ids of the parent changesets.
    *
    *
    * @return
   }
 
   /**
-   * Method description
+   * Returns tags associated with this changeset.
    *
    *
-   * @return
+   * @return tags of the changeset
    */
   public List<String> getTags()
   {
   }
 
   /**
-   * Method description
+   * Returns true if the changeset is valid.
    *
    *
-   * @return
+   * @return true if the changeset is valid
    */
   @Override
   public boolean isValid()
   //~--- set methods ----------------------------------------------------------
 
   /**
-   * Method description
+   * Sets the author of the changeset.
    *
    *
-   * @param author
+   * @param author author of the changeset
    */
   public void setAuthor(Person author)
   {
   }
 
   /**
-   * Method description
+   * Sets the branches of the changeset.
    *
    *
-   * @param branches
+   * @param branches branches of the changeset
    */
   public void setBranches(List<String> branches)
   {
   }
 
   /**
-   * Method description
+   * Sets the date of the changeset.
    *
    *
-   * @param date
+   * @param date date of the changeset
    */
   public void setDate(Long date)
   {
   }
 
   /**
-   * Method description
+   * Sets the description (commit message) of the changeset.
    *
    *
-   * @param description
+   * @param description description of the changeset
    */
   public void setDescription(String description)
   {
   }
 
   /**
-   * Method description
+   * Sets the id of the changeset.
    *
    *
-   * @param id
+   * @param id id of the changeset
    */
   public void setId(String id)
   {
   }
 
   /**
-   * Method description
+   * Sets the file modification of the changeset.
    *
    *
-   * @param modifications
+   * @param modifications file modifications
    */
   public void setModifications(Modifications modifications)
   {
   }
 
   /**
-   * Method description
+   * Sets the parents of the changeset.
    *
    *
-   * @param parents
+   * @param parents parents of the changeset
    * @since 1.11
    */
   public void setParents(List<String> parents)
   }
 
   /**
-   * Method description
+   * Sets the tags of the changeset
    *
    *
-   * @param tags
+   * @param tags tags of the changeset
    */
   public void setTags(List<String> tags)
   {

File scm-core/src/main/java/sonia/scm/repository/ChangesetPagingResult.java

View file
 import javax.xml.bind.annotation.XmlRootElement;
 
 /**
+ * The changeset paging result is used to do a paging over the 
+ * {@link Changeset}s of a {@link Repository}.
  *
  * @author Sebastian Sdorra
  */
   //~--- constructors ---------------------------------------------------------
 
   /**
-   * Constructs ...
+   * Constructs a new changeset paging result.
    *
    */
   public ChangesetPagingResult() {}
 
   /**
-   * Constructs ...
+   * Constructs a new changeset paging result.
    *
    *
-   * @param total
-   * @param changesets
+   * @param total total number of changesets
+   * @param changesets current list of fetched changesets
    */
   public ChangesetPagingResult(int total, List<Changeset> changesets)
   {
   //~--- methods --------------------------------------------------------------
 
   /**
-   * Method description
+   * Returns an iterator which can iterate over the current list of changesets.
    *
    *
-   * @return
+   * @return iterator for current list of changesets
    * @since 1.8
    */
   @Override
   //~--- get methods ----------------------------------------------------------
 
   /**
-   * Method description
+   * Returns the current list of changesets.
    *
    *
-   * @return
+   * @return current list of changesets
    */
   public List<Changeset> getChangesets()
   {
   }
 
   /**
-   * Method description
+   * Returns the total number of changesets.
    *
    *
-   * @return
+   * @return total number of changesets
    */
   public int getTotal()
   {
   //~--- set methods ----------------------------------------------------------
 
   /**
-   * Method description
+   * Sets the current list of changesets.
    *
    *
-   * @param changesets
+   * @param changesets current list of changesets
    */
   public void setChangesets(List<Changeset> changesets)
   {
   }
 
   /**
-   * Method description
+   * Sets the total number of changesets
    *
    *
-   * @param total
+   * @param total total number of changesets
    */
   public void setTotal(int total)
   {
 
   //~--- fields ---------------------------------------------------------------
 
-  /** Field description */
+  /** current list of changesets */
   @XmlElement(name = "changeset")
   @XmlElementWrapper(name = "changesets")
   private List<Changeset> changesets;
 
-  /** Field description */
+  /** total number of changesets */
   private int total;
 }

File scm-core/src/main/java/sonia/scm/repository/PostReceiveRepositoryHook.java

View file
 import java.util.Collection;
 
 /**
+ * Base class for asynchronous post receive repository hook.
  *
+ * @see RepositoryHookType#POST_RECEIVE
  * @author Sebastian Sdorra
  * @since 1.8
  */
 {
 
   /**
-   * Method description
+   * {@inheritDoc}
    *
    *
    * @return
   }
 
   /**
-   * Method description
+   * {@inheritDoc}
    *
    *
    * @return

File scm-core/src/main/java/sonia/scm/repository/PreReceiveRepositoryHook.java

View file
 import java.util.Collection;
 
 /**
+ * Base class for pre receive repository hooks.
  *
+ * @see RepositoryHookType#PRE_RECEIVE
  * @author Sebastian Sdorra
  * @since 1.8
  */
 {
 
   /**
-   * Method description
+   * {@inheritDoc}
    *
    *
    * @return
   }
 
   /**
-   * Method description
+   * {@inheritDoc}
    *
    *
    * @return

File scm-core/src/main/java/sonia/scm/repository/RepositoryHookEvent.java

View file
 import java.util.Collection;
 
 /**
+ * Repository hook event represents an change event of a repository.
  *
  * @author Sebastian Sdorra
  * @since 1.6
 {
 
   /**
-   * Method description
+   * Returns a collection of changesets which are added with this repository
+   * event.
    *
    *
-   * @return
+   * @return a collection of added changesets
    */
   public Collection<Changeset> getChangesets();
 
   /**
-   * Method description
+   * Returns the repository which was modified.
    *
    *
-   * @return
+   * @return modified repository
    */
   public Repository getRepository();
 
   /**
-   * Method description
+   * Returns the type of hook event.
    *
    *
-   * @return
+   * @return type of hook event
    */
   public RepositoryHookType getType();
 
   //~--- set methods ----------------------------------------------------------
 
   /**
-   * Method description
+   * Sets the modified repository. This method is only for internal use and
+   * should never be called on a hook.
    *
    *
-   * @param repository
+   * @param repository modified repository
    */
   void setRepository(Repository repository);
 }

File scm-core/src/main/java/sonia/scm/repository/RepositoryHookType.java

View file
 package sonia.scm.repository;
 
 /**
+ * Type of repository hook.
  *
  * @author Sebastian Sdorra
  * @since 1.6
 {
 
   /**
+   * A pre receive hook is invoked when new changesets are pushed to the
+   * repository, but they are not yet stored in the repository. A pre receive 
+   * hook can be used to reject the new incoming changesets.
+   * 
    * @since 1.8
    */
   PRE_RECEIVE,
 
   /**
+   * A post receive hook is invoked when new changesets are stored in the
+   * repository.
+   *
    * @since 1.6
    */
   POST_RECEIVE

File scm-core/src/main/java/sonia/scm/repository/RepositoryType.java

View file
 import java.util.Set;
 
 /**
+ * The type (mercurial, subversion, git) of a {@link Repository}.
  *
  * @author Sebastian Sdorra
  * @since 1.18
   public RepositoryType() {}
 
   /**
-   * Constructs ...
+   * Constructs a new {@link RepositoryType} object.
    *
    *
-   * @param name
-   * @param displayName
-   * @param supportedCommands
+   * @param name name of the type
+   * @param displayName display name of the type
+   * @param supportedCommands supported commands of the type
    */
   public RepositoryType(String name, String displayName,
     Set<Command> supportedCommands)
   //~--- get methods ----------------------------------------------------------
 
   /**
-   * Method description
+   * Returns a set of commands, which are supported of the repository type.
    *
    *
-   * @return
+   * @return set of supported commands
    */
   public Set<Command> getSupportedCommands()
   {
 
   //~--- fields ---------------------------------------------------------------
 
-  /** Field description */
+  /** set of supported commands */
   private Set<Command> supportedCommands;
 }

File scm-core/src/main/java/sonia/scm/repository/RepositoryTypePredicate.java

View file
  */
 
 
+
 package sonia.scm.repository;
 
 //~--- non-JDK imports --------------------------------------------------------
 import com.google.common.base.Predicate;
 
 /**
+ * Used to filter collections of repositories by its type.
  *
  * @author Sebastian Sdorra
  * @since 1.16
 {
 
   /**
-   * Constructs ...
+   * Constructs new {@link RepositoryTypePredicate} object.
    *
    *
-   * @param type
+   * @param type type to filter
    */
   public RepositoryTypePredicate(String type)
   {
   //~--- methods --------------------------------------------------------------
 
   /**
-   * Method description
+   * Return true if the repository is from the given type.
    *
    *
-   * @param repository
+   * @param repository repository to check
    *
-   * @return
+   * @return true if the repository is from the given type
    */
   @Override
   public boolean apply(Repository repository)
 
   //~--- fields ---------------------------------------------------------------
 
-  /** Field description */
+  /** type to filter */
   private String type;
 }