mirror of
https://github.com/scm-manager/scm-manager.git
synced 2026-02-06 22:59:12 +01:00
added disable option to each core plugin
This commit is contained in:
@@ -275,15 +275,15 @@ public abstract class AbstractRepositoryHandler<C extends SimpleRepositoryConfig
|
||||
}
|
||||
|
||||
/**
|
||||
* Method description
|
||||
* Returns true if the plugin is configured and enabled.
|
||||
*
|
||||
*
|
||||
* @return
|
||||
* @return true if the plugin is configured and enabled
|
||||
*/
|
||||
@Override
|
||||
public boolean isConfigured()
|
||||
{
|
||||
return (config != null) && config.isValid();
|
||||
return (config != null) && config.isValid() &&!config.isDisabled();
|
||||
}
|
||||
|
||||
//~--- set methods ----------------------------------------------------------
|
||||
|
||||
@@ -63,6 +63,18 @@ public class SimpleRepositoryConfig implements Validateable
|
||||
return repositoryDirectory;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if the plugin is disabled.
|
||||
*
|
||||
*
|
||||
* @return true if the plugin is disabled
|
||||
* @since 1.13
|
||||
*/
|
||||
public boolean isDisabled()
|
||||
{
|
||||
return disabled;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if the configuration object is valid.
|
||||
*
|
||||
@@ -77,6 +89,18 @@ public class SimpleRepositoryConfig implements Validateable
|
||||
|
||||
//~--- set methods ----------------------------------------------------------
|
||||
|
||||
/**
|
||||
* Enable or disable the plugin.
|
||||
*
|
||||
*
|
||||
* @param disabled
|
||||
* @since 1.13
|
||||
*/
|
||||
public void setDisabled(boolean disabled)
|
||||
{
|
||||
this.disabled = disabled;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the directory for the repositories
|
||||
*
|
||||
@@ -90,6 +114,9 @@ public class SimpleRepositoryConfig implements Validateable
|
||||
|
||||
//~--- fields ---------------------------------------------------------------
|
||||
|
||||
/** Field description */
|
||||
/** true if the plugin is disabled */
|
||||
private boolean disabled = false;
|
||||
|
||||
/** directory for repositories */
|
||||
private File repositoryDirectory;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user