mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-15 09:46:16 +01:00
added configuration parameters for repository archive
This commit is contained in:
@@ -33,6 +33,10 @@
|
||||
|
||||
package sonia.scm;
|
||||
|
||||
//~--- non-JDK imports --------------------------------------------------------
|
||||
|
||||
import sonia.scm.config.ScmConfiguration;
|
||||
|
||||
/**
|
||||
* Configuration object for a SCM-Manager
|
||||
* client (WebInterface, RestClient, ...).
|
||||
@@ -48,6 +52,20 @@ public class ScmClientConfig
|
||||
*/
|
||||
public ScmClientConfig() {}
|
||||
|
||||
/**
|
||||
* Constructs {@link ScmClientConfig} object
|
||||
*
|
||||
*
|
||||
* @param configuration SCM-Manager main configuration
|
||||
* @since 1.14
|
||||
*/
|
||||
public ScmClientConfig(ScmConfiguration configuration)
|
||||
{
|
||||
this.dateFormat = configuration.getDateFormat();
|
||||
this.disableGroupingGrid = configuration.isDisableGroupingGrid();
|
||||
this.enableRepositoryArchive = configuration.isEnableRepositoryArchive();
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs {@link ScmClientConfig} object
|
||||
*
|
||||
@@ -100,6 +118,18 @@ public class ScmClientConfig
|
||||
return disableGroupingGrid;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if the repository archive is disabled.
|
||||
*
|
||||
*
|
||||
* @return true if the repository archive is disabled
|
||||
* @since 1.14
|
||||
*/
|
||||
public boolean isEnableRepositoryArchive()
|
||||
{
|
||||
return enableRepositoryArchive;
|
||||
}
|
||||
|
||||
//~--- set methods ----------------------------------------------------------
|
||||
|
||||
/**
|
||||
@@ -127,11 +157,26 @@ public class ScmClientConfig
|
||||
this.disableGroupingGrid = disableGroupingGrid;
|
||||
}
|
||||
|
||||
/**
|
||||
* Enable or disable the repository archive. Default is disabled.
|
||||
*
|
||||
*
|
||||
* @param enableRepositoryArchive true to disable the repository archive
|
||||
* @since 1.14
|
||||
*/
|
||||
public void setEnableRepositoryArchive(boolean enableRepositoryArchive)
|
||||
{
|
||||
this.enableRepositoryArchive = enableRepositoryArchive;
|
||||
}
|
||||
|
||||
//~--- fields ---------------------------------------------------------------
|
||||
|
||||
/** Field description */
|
||||
private String dateFormat;
|
||||
|
||||
/** Field description */
|
||||
private boolean enableRepositoryArchive = true;
|
||||
|
||||
/** Field description */
|
||||
private boolean disableGroupingGrid = true;
|
||||
}
|
||||
|
||||
@@ -165,6 +165,7 @@ public class ScmConfiguration
|
||||
this.forceBaseUrl = other.forceBaseUrl;
|
||||
this.baseUrl = other.baseUrl;
|
||||
this.disableGroupingGrid = other.disableGroupingGrid;
|
||||
this.enableRepositoryArchive = other.enableRepositoryArchive;
|
||||
|
||||
// deprecated fields
|
||||
this.sslPort = other.sslPort;
|
||||
@@ -381,6 +382,18 @@ public class ScmConfiguration
|
||||
return enableProxy;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if the repository archive is enabled.
|
||||
*
|
||||
*
|
||||
* @return true if the repository archive is enabled
|
||||
* @since 1.14
|
||||
*/
|
||||
public boolean isEnableRepositoryArchive()
|
||||
{
|
||||
return enableRepositoryArchive;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if ssl is enabled.
|
||||
*
|
||||
@@ -475,6 +488,18 @@ public class ScmConfiguration
|
||||
this.disableGroupingGrid = disableGroupingGrid;
|
||||
}
|
||||
|
||||
/**
|
||||
* Enable or disable the repository archive. Default is disabled.
|
||||
*
|
||||
*
|
||||
* @param enableRepositoryArchive true to disable the repository archive
|
||||
* @since 1.14
|
||||
*/
|
||||
public void setDisableRepositoryArchive(boolean enableRepositoryArchive)
|
||||
{
|
||||
this.enableRepositoryArchive = enableRepositoryArchive;
|
||||
}
|
||||
|
||||
/**
|
||||
* Method description
|
||||
*
|
||||
@@ -682,6 +707,9 @@ public class ScmConfiguration
|
||||
private Set<ConfigChangedListener> listeners =
|
||||
new HashSet<ConfigChangedListener>();
|
||||
|
||||
/** Field description */
|
||||
private boolean enableRepositoryArchive = false;
|
||||
|
||||
/** Field description */
|
||||
private boolean disableGroupingGrid = false;
|
||||
|
||||
|
||||
@@ -345,6 +345,18 @@ public class Repository extends BasicPropertiesAware implements ModelObject
|
||||
return url;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if the repository is archived.
|
||||
*
|
||||
*
|
||||
* @return true if the repository is archived
|
||||
* @since 1.14
|
||||
*/
|
||||
public boolean isArchived()
|
||||
{
|
||||
return archived;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if the {@link Repository} is public readable.
|
||||
*
|
||||
@@ -377,6 +389,18 @@ public class Repository extends BasicPropertiesAware implements ModelObject
|
||||
|
||||
//~--- set methods ----------------------------------------------------------
|
||||
|
||||
/**
|
||||
* Archive or un archive this repository.
|
||||
*
|
||||
*
|
||||
* @param archived true to enable archive
|
||||
* @since 1.14
|
||||
*/
|
||||
public void setArchived(boolean archived)
|
||||
{
|
||||
this.archived = archived;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the contact of the {@link Repository}. The contact address should be
|
||||
* a email address of a person who is responsible for the {@link Repository}.
|
||||
@@ -516,6 +540,9 @@ public class Repository extends BasicPropertiesAware implements ModelObject
|
||||
@XmlElement(name = "public")
|
||||
private boolean publicReadable = false;
|
||||
|
||||
/** Field description */
|
||||
private boolean archived = false;
|
||||
|
||||
/** Field description */
|
||||
private String type;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user