com.atlassian.fisheye.spi.admin.data
Class RepositoryData

java.lang.Object
  extended by com.atlassian.fisheye.spi.admin.data.RepositoryData
Direct Known Subclasses:
ClearCaseRepositoryData, CvsRepositoryData, GitRepositoryData, P4RepositoryData, SvnRepositoryData

public abstract class RepositoryData
extends java.lang.Object

A detached data object representing a FishEye repository.

Use RepositoryAdminService.create(RepositoryData) and RepositoryAdminService.update(RepositoryData) to have modifications to RepositoryData objects persisted.


Nested Class Summary
static class RepositoryData.Type
           
 
Field Summary
static java.util.regex.Pattern NAME_REGEX
          Regular expression used to validate repository names.
static java.util.regex.Pattern TIME_INTERVAL_REGEX
          Regular expression used to validate time interval strings.
 
Constructor Summary
RepositoryData(java.lang.String name)
           
 
Method Summary
 java.lang.String getDescription()
           
 java.lang.String getName()
           
abstract  RepositoryData.Type getType()
           
 boolean isStoreDiff()
          Whether FishEye caches the summary (not the diff itself) of what lines are added and removed between subsequent versions of the same file in its database.
 void setDescription(java.lang.String description)
           
 void setName(java.lang.String name)
           
 void setStoreDiff(boolean storeDiff)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NAME_REGEX

public static final java.util.regex.Pattern NAME_REGEX
Regular expression used to validate repository names.

Repository names can contain alphanumeric characters, digits, underscores (_), dashes (-), and dots (.).


TIME_INTERVAL_REGEX

public static final java.util.regex.Pattern TIME_INTERVAL_REGEX
Regular expression used to validate time interval strings.

Time intervals begin with one or more digits, i.e., an integer, followed by zero of more spaces, followed by a time unit string. Valid time units and their strings are:

Time unit Valid strings
seconds s, second, seconds
minutes mi, minute, minutes
hours h, hour, hours
days d, day, days
weeks w, week, weeks
months mo, month, months
years y, year, years

Constructor Detail

RepositoryData

public RepositoryData(java.lang.String name)
Method Detail

getType

public abstract RepositoryData.Type getType()

getName

public java.lang.String getName()

setName

public final void setName(java.lang.String name)
Throws:
java.lang.NullPointerException - if name is null
java.lang.IllegalArgumentException - if name is doesn't match NAME_REGEX

getDescription

public java.lang.String getDescription()

setDescription

public void setDescription(java.lang.String description)

isStoreDiff

public boolean isStoreDiff()
Whether FishEye caches the summary (not the diff itself) of what lines are added and removed between subsequent versions of the same file in its database.

Defaults to true unless overridden by using setStoreDiff(boolean).


setStoreDiff

public void setStoreDiff(boolean storeDiff)