mirror of
https://github.com/scm-manager/scm-manager.git
synced 2026-01-20 22:42:16 +01:00
indent and javadoc
This commit is contained in:
@@ -34,6 +34,7 @@
|
||||
package sonia.scm;
|
||||
|
||||
/**
|
||||
* Base interface for all handler objects.
|
||||
*
|
||||
* @author Sebastian Sdorra
|
||||
*
|
||||
|
||||
@@ -29,6 +29,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
|
||||
package sonia.scm;
|
||||
|
||||
/**
|
||||
@@ -36,12 +38,15 @@ package sonia.scm;
|
||||
*
|
||||
* @author Sebastian Sdorra
|
||||
*/
|
||||
public enum HandlerEvent
|
||||
public enum HandlerEvent
|
||||
{
|
||||
|
||||
/** The type of the event, if a new object is stored by a handler. */
|
||||
CREATE,
|
||||
CREATE,
|
||||
|
||||
/** The type of the event, if a object is modified by a handler. */
|
||||
MODIFY,
|
||||
|
||||
/** The type of the event, if a object is removed by a handler. */
|
||||
DELETE
|
||||
DELETE
|
||||
}
|
||||
|
||||
@@ -29,6 +29,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
|
||||
package sonia.scm;
|
||||
|
||||
/**
|
||||
@@ -43,7 +45,8 @@ public interface Initable
|
||||
* This method is called when the SCM manager is started.
|
||||
*
|
||||
*
|
||||
* @param the context provider of the SCM-Manager
|
||||
*
|
||||
* @param context
|
||||
*/
|
||||
public void init(SCMContextProvider context);
|
||||
}
|
||||
|
||||
@@ -52,6 +52,7 @@ public class Platform
|
||||
* @param osName - name of the operation system
|
||||
* @param archModel - name of the host architecture model
|
||||
* @param archModel - name of the operation system architecture
|
||||
* @param osArch
|
||||
*/
|
||||
public Platform(String osName, String archModel, String osArch)
|
||||
{
|
||||
|
||||
@@ -40,7 +40,7 @@ import java.io.File;
|
||||
|
||||
/**
|
||||
* The main class for retrieving the home and the version of the SCM-Manager.
|
||||
* This class is a singleton which can be retrieved via
|
||||
* This class is a singleton which can be retrieved via
|
||||
* inject or with the static {@link SCMContext#getContext()} method.
|
||||
*
|
||||
* @author Sebastian Sdorra
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
package sonia.scm;
|
||||
|
||||
/**
|
||||
* Configuration object for the SCM-Manager
|
||||
* Configuration object for a SCM-Manager
|
||||
* client (WebInterface, RestClient, ...).
|
||||
*
|
||||
* @author Sebastian Sdorra
|
||||
|
||||
@@ -48,6 +48,7 @@ import javax.xml.bind.annotation.XmlElement;
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
|
||||
/**
|
||||
* This class represents the current state of the SCM-Manager.
|
||||
*
|
||||
* @author Sebastian Sdorra
|
||||
*/
|
||||
@@ -57,7 +58,8 @@ public class ScmState
|
||||
{
|
||||
|
||||
/**
|
||||
* Constructs {@link ScmState} object. This constructor is required by JAXB.
|
||||
* Constructs {@link ScmState} object.
|
||||
* This constructor is required by JAXB.
|
||||
*
|
||||
*/
|
||||
public ScmState() {}
|
||||
@@ -86,10 +88,10 @@ public class ScmState
|
||||
//~--- get methods ----------------------------------------------------------
|
||||
|
||||
/**
|
||||
* Method description
|
||||
* Returns configuration for SCM-Manager clients.
|
||||
*
|
||||
*
|
||||
* @return
|
||||
* @return configuration for SCM-Manager clients
|
||||
*/
|
||||
public ScmClientConfig getClientConfig()
|
||||
{
|
||||
@@ -97,10 +99,11 @@ public class ScmState
|
||||
}
|
||||
|
||||
/**
|
||||
* Method description
|
||||
* Returns a {@link java.util.Collection} of groups names which are associated
|
||||
* to the current user.
|
||||
*
|
||||
*
|
||||
* @return
|
||||
* @return a {@link java.util.Collection} of groups names
|
||||
*/
|
||||
public Collection<String> getGroups()
|
||||
{
|
||||
@@ -108,10 +111,10 @@ public class ScmState
|
||||
}
|
||||
|
||||
/**
|
||||
* Method description
|
||||
* Returns all available repository types.
|
||||
*
|
||||
*
|
||||
* @return
|
||||
* @return all available repository types
|
||||
*/
|
||||
public Collection<Type> getRepositoryTypes()
|
||||
{
|
||||
@@ -119,10 +122,10 @@ public class ScmState
|
||||
}
|
||||
|
||||
/**
|
||||
* Method description
|
||||
* Returns the current logged in user.
|
||||
*
|
||||
*
|
||||
* @return
|
||||
* @return current logged in user
|
||||
*/
|
||||
public User getUser()
|
||||
{
|
||||
@@ -130,10 +133,10 @@ public class ScmState
|
||||
}
|
||||
|
||||
/**
|
||||
* Method description
|
||||
* Returns the version of the SCM-Manager.
|
||||
*
|
||||
*
|
||||
* @return
|
||||
* @return version of the SCM-Manager
|
||||
*/
|
||||
public String getVersion()
|
||||
{
|
||||
@@ -141,10 +144,10 @@ public class ScmState
|
||||
}
|
||||
|
||||
/**
|
||||
* Method description
|
||||
* Returns true if the request was successful.
|
||||
* This method is required by extjs.
|
||||
*
|
||||
*
|
||||
* @return
|
||||
* @return true if the request was successful
|
||||
*/
|
||||
public boolean isSuccess()
|
||||
{
|
||||
@@ -154,7 +157,8 @@ public class ScmState
|
||||
//~--- set methods ----------------------------------------------------------
|
||||
|
||||
/**
|
||||
* Method description
|
||||
* Setter for the client configuration
|
||||
*
|
||||
*
|
||||
*
|
||||
* @param clientConfig
|
||||
@@ -165,7 +169,8 @@ public class ScmState
|
||||
}
|
||||
|
||||
/**
|
||||
* Method description
|
||||
* Setter for the groups.
|
||||
*
|
||||
*
|
||||
*
|
||||
* @param groups
|
||||
@@ -176,7 +181,8 @@ public class ScmState
|
||||
}
|
||||
|
||||
/**
|
||||
* Method description
|
||||
* Setter for the available repository types.
|
||||
*
|
||||
*
|
||||
*
|
||||
* @param repositoryTypes
|
||||
@@ -187,10 +193,10 @@ public class ScmState
|
||||
}
|
||||
|
||||
/**
|
||||
* Method description
|
||||
* Setter for the success switch.
|
||||
*
|
||||
*
|
||||
* @param success
|
||||
* @param success switch
|
||||
*/
|
||||
public void setSuccess(boolean success)
|
||||
{
|
||||
@@ -198,7 +204,8 @@ public class ScmState
|
||||
}
|
||||
|
||||
/**
|
||||
* Method description
|
||||
* Setter for the User
|
||||
*
|
||||
*
|
||||
*
|
||||
* @param user
|
||||
@@ -209,7 +216,8 @@ public class ScmState
|
||||
}
|
||||
|
||||
/**
|
||||
* Method description
|
||||
* Setter for the SCM-Manager version.
|
||||
*
|
||||
*
|
||||
*
|
||||
* @param version
|
||||
|
||||
@@ -34,6 +34,7 @@
|
||||
package sonia.scm;
|
||||
|
||||
/**
|
||||
* Type of a servlet container.
|
||||
*
|
||||
* @author Sebastian Sdorra
|
||||
*/
|
||||
|
||||
@@ -47,7 +47,8 @@ public interface TransformFilter<T>
|
||||
* Transform the given object.
|
||||
*
|
||||
*
|
||||
* @param object to transform
|
||||
*
|
||||
* @param item
|
||||
*
|
||||
* @return tranformed object
|
||||
*/
|
||||
|
||||
@@ -54,6 +54,8 @@ public interface Cache<K, V>
|
||||
*
|
||||
*
|
||||
* @param key
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public boolean contains(K key);
|
||||
|
||||
|
||||
@@ -29,6 +29,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
|
||||
package sonia.scm.cli;
|
||||
|
||||
//~--- JDK imports ------------------------------------------------------------
|
||||
|
||||
@@ -29,6 +29,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
|
||||
package sonia.scm.cli;
|
||||
|
||||
/**
|
||||
|
||||
@@ -29,6 +29,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
|
||||
package sonia.scm.cli;
|
||||
|
||||
//~--- JDK imports ------------------------------------------------------------
|
||||
|
||||
@@ -29,6 +29,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
|
||||
package sonia.scm.cli;
|
||||
|
||||
//~--- JDK imports ------------------------------------------------------------
|
||||
|
||||
@@ -29,6 +29,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
|
||||
package sonia.scm.cli;
|
||||
|
||||
/**
|
||||
|
||||
@@ -29,6 +29,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
|
||||
package sonia.scm.cli;
|
||||
|
||||
//~--- non-JDK imports --------------------------------------------------------
|
||||
|
||||
@@ -29,6 +29,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
|
||||
package sonia.scm.cli;
|
||||
|
||||
//~--- JDK imports ------------------------------------------------------------
|
||||
|
||||
@@ -96,7 +96,8 @@ public class ScmConfiguration implements ListenerSupport<ConfigChangedListener>
|
||||
* Register a {@link sonia.scm.ConfigChangedListener}
|
||||
*
|
||||
*
|
||||
* @param a {@link sonia.scm.ConfigChangedListener}
|
||||
*
|
||||
* @param listener
|
||||
*/
|
||||
@Override
|
||||
public void addListener(ConfigChangedListener listener)
|
||||
@@ -108,7 +109,8 @@ public class ScmConfiguration implements ListenerSupport<ConfigChangedListener>
|
||||
* Register a {@link java.util.Collection} of {@link sonia.scm.ConfigChangedListener}
|
||||
*
|
||||
*
|
||||
* @param a {@link java.util.Collection} of {@link sonia.scm.ConfigChangedListener}
|
||||
*
|
||||
* @param listeners
|
||||
*/
|
||||
@Override
|
||||
public void addListeners(Collection<ConfigChangedListener> listeners)
|
||||
@@ -142,7 +144,8 @@ public class ScmConfiguration implements ListenerSupport<ConfigChangedListener>
|
||||
* Load all properties from another {@link ScmConfiguration} object.
|
||||
*
|
||||
*
|
||||
* @param another {@link ScmConfiguration} object
|
||||
*
|
||||
* @param other
|
||||
*/
|
||||
public void load(ScmConfiguration other)
|
||||
{
|
||||
@@ -214,8 +217,8 @@ public class ScmConfiguration implements ListenerSupport<ConfigChangedListener>
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the date format for the user interface. This format is a
|
||||
* JavaScript date format, see
|
||||
* Returns the date format for the user interface. This format is a
|
||||
* JavaScript date format, see
|
||||
* {@link http://jacwright.com/projects/javascript/date_format}.
|
||||
*
|
||||
*
|
||||
|
||||
@@ -29,6 +29,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
|
||||
package sonia.scm.io;
|
||||
|
||||
//~--- JDK imports ------------------------------------------------------------
|
||||
|
||||
@@ -29,6 +29,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
|
||||
package sonia.scm.io;
|
||||
|
||||
//~--- JDK imports ------------------------------------------------------------
|
||||
|
||||
@@ -29,6 +29,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
|
||||
package sonia.scm.io;
|
||||
|
||||
//~--- JDK imports ------------------------------------------------------------
|
||||
|
||||
@@ -29,6 +29,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
|
||||
package sonia.scm.io;
|
||||
|
||||
//~--- JDK imports ------------------------------------------------------------
|
||||
|
||||
@@ -29,6 +29,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
|
||||
package sonia.scm.io;
|
||||
|
||||
/**
|
||||
|
||||
@@ -29,6 +29,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
|
||||
package sonia.scm.io;
|
||||
|
||||
//~--- JDK imports ------------------------------------------------------------
|
||||
|
||||
@@ -29,6 +29,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
|
||||
package sonia.scm.io;
|
||||
|
||||
//~--- JDK imports ------------------------------------------------------------
|
||||
|
||||
@@ -29,6 +29,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
|
||||
package sonia.scm.io;
|
||||
|
||||
//~--- non-JDK imports --------------------------------------------------------
|
||||
|
||||
@@ -29,6 +29,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
|
||||
package sonia.scm.io;
|
||||
|
||||
//~--- non-JDK imports --------------------------------------------------------
|
||||
|
||||
@@ -29,6 +29,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
|
||||
package sonia.scm.io;
|
||||
|
||||
//~--- JDK imports ------------------------------------------------------------
|
||||
|
||||
@@ -29,6 +29,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
|
||||
package sonia.scm.io;
|
||||
|
||||
//~--- JDK imports ------------------------------------------------------------
|
||||
|
||||
@@ -29,6 +29,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
|
||||
package sonia.scm.io;
|
||||
|
||||
//~--- JDK imports ------------------------------------------------------------
|
||||
|
||||
@@ -176,13 +176,14 @@ public class SimpleCommand implements Command
|
||||
}
|
||||
|
||||
int returnCode = process.waitFor();
|
||||
|
||||
if ( logger.isDebugEnabled() )
|
||||
|
||||
if (logger.isDebugEnabled())
|
||||
{
|
||||
logger.debug( "command returned with exitcode {}", returnCode );
|
||||
if ( logger.isTraceEnabled() )
|
||||
logger.debug("command returned with exitcode {}", returnCode);
|
||||
|
||||
if (logger.isTraceEnabled())
|
||||
{
|
||||
logger.trace("command content: {}{}", s, content.toString() );
|
||||
logger.trace("command content: {}{}", s, content.toString());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -29,6 +29,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
|
||||
package sonia.scm.io;
|
||||
|
||||
/**
|
||||
|
||||
@@ -36,6 +36,7 @@ package sonia.scm.net;
|
||||
//~--- JDK imports ------------------------------------------------------------
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@@ -53,6 +54,8 @@ public interface HttpClient
|
||||
* @param url
|
||||
*
|
||||
* @return
|
||||
*
|
||||
* @throws IOException
|
||||
*/
|
||||
public HttpResponse post(String url) throws IOException;
|
||||
|
||||
@@ -64,8 +67,11 @@ public interface HttpClient
|
||||
* @param parameters
|
||||
*
|
||||
* @return
|
||||
*
|
||||
* @throws IOException
|
||||
*/
|
||||
public HttpResponse post(String url, Map<String, List<String>> parameters) throws IOException;
|
||||
public HttpResponse post(String url, Map<String, List<String>> parameters)
|
||||
throws IOException;
|
||||
|
||||
//~--- get methods ----------------------------------------------------------
|
||||
|
||||
@@ -76,6 +82,8 @@ public interface HttpClient
|
||||
* @param url
|
||||
*
|
||||
* @return
|
||||
*
|
||||
* @throws IOException
|
||||
*/
|
||||
public HttpResponse get(String url) throws IOException;
|
||||
|
||||
@@ -87,6 +95,9 @@ public interface HttpClient
|
||||
* @param parameters
|
||||
*
|
||||
* @return
|
||||
*
|
||||
* @throws IOException
|
||||
*/
|
||||
public HttpResponse get(String url, Map<String, List<String>> parameters) throws IOException;
|
||||
public HttpResponse get(String url, Map<String, List<String>> parameters)
|
||||
throws IOException;
|
||||
}
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
*/
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Base classes and interfaces of the SCM-Manager.
|
||||
*/
|
||||
|
||||
@@ -169,7 +169,7 @@ public class Plugin
|
||||
//~--- fields ---------------------------------------------------------------
|
||||
|
||||
/** Field description */
|
||||
@XmlElement(name="conditions")
|
||||
@XmlElement(name = "conditions")
|
||||
private PluginCondition condition;
|
||||
|
||||
/** Field description */
|
||||
|
||||
@@ -221,16 +221,18 @@ public class PluginCondition
|
||||
private boolean isOs(String osType, PlatformType type)
|
||||
{
|
||||
osType = osType.toLowerCase();
|
||||
|
||||
return
|
||||
( osType.indexOf("win") >= 0 && PlatformType.WINDOWS == type ) ||
|
||||
( osType.indexOf("unix") >= 0 && type.isUnix() ) ||
|
||||
( osType.indexOf("posix") >= 0 && type.isPosix() ) ||
|
||||
( osType.indexOf("mac") >= 0 && PlatformType.MAC == type) ||
|
||||
( osType.indexOf("linux") >= 0 && PlatformType.LINUX == type ) ||
|
||||
( osType.indexOf("solaris") >= 0 && PlatformType.SOLARIS == type ) ||
|
||||
( osType.indexOf("openbsd") >= 0 && PlatformType.OPENBSD == type ) ||
|
||||
( osType.indexOf("freebsd") >= 0 && PlatformType.FREEBSD == type );
|
||||
|
||||
return ((osType.indexOf("win") >= 0) && (PlatformType.WINDOWS == type))
|
||||
|| ((osType.indexOf("unix") >= 0) && type.isUnix())
|
||||
|| ((osType.indexOf("posix") >= 0) && type.isPosix())
|
||||
|| ((osType.indexOf("mac") >= 0) && (PlatformType.MAC == type))
|
||||
|| ((osType.indexOf("linux") >= 0) && (PlatformType.LINUX == type))
|
||||
|| ((osType.indexOf("solaris") >= 0)
|
||||
&& (PlatformType.SOLARIS
|
||||
== type)) || ((osType.indexOf("openbsd") >= 0)
|
||||
&& (PlatformType.OPENBSD
|
||||
== type)) || ((osType.indexOf("freebsd")
|
||||
>= 0) && (PlatformType.FREEBSD == type));
|
||||
}
|
||||
|
||||
//~--- fields ---------------------------------------------------------------
|
||||
|
||||
@@ -37,6 +37,7 @@ package sonia.scm.repository;
|
||||
|
||||
import com.google.inject.Provider;
|
||||
|
||||
import sonia.scm.security.ScmSecurityException;
|
||||
import sonia.scm.user.User;
|
||||
import sonia.scm.util.AssertUtil;
|
||||
import sonia.scm.web.security.WebSecurityContext;
|
||||
@@ -45,7 +46,6 @@ import sonia.scm.web.security.WebSecurityContext;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
import sonia.scm.security.ScmSecurityException;
|
||||
|
||||
/**
|
||||
*
|
||||
|
||||
@@ -109,7 +109,7 @@ public class Person implements Validateable
|
||||
if ((s > 0) && (e > 0))
|
||||
{
|
||||
name = value.substring(0, s).trim();
|
||||
mail = value.substring(s+1, e).trim();
|
||||
mail = value.substring(s + 1, e).trim();
|
||||
}
|
||||
|
||||
person = new Person(name, mail);
|
||||
|
||||
@@ -29,6 +29,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
|
||||
package sonia.scm.repository;
|
||||
|
||||
/**
|
||||
|
||||
@@ -29,6 +29,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
|
||||
package sonia.scm.repository;
|
||||
|
||||
/**
|
||||
|
||||
@@ -29,6 +29,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
|
||||
package sonia.scm.repository;
|
||||
|
||||
/**
|
||||
|
||||
@@ -29,6 +29,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
|
||||
package sonia.scm.security;
|
||||
|
||||
/**
|
||||
|
||||
@@ -29,6 +29,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
|
||||
package sonia.scm.security;
|
||||
|
||||
/**
|
||||
|
||||
@@ -195,10 +195,12 @@ public class IOUtil
|
||||
* @param in
|
||||
* @param out
|
||||
* @param bufferSize
|
||||
* @param byteCount
|
||||
*
|
||||
* @throws IOException
|
||||
*/
|
||||
public static void copy(InputStream in, OutputStream out, int bufferSize, int byteCount)
|
||||
public static void copy(InputStream in, OutputStream out, int bufferSize,
|
||||
int byteCount)
|
||||
throws IOException
|
||||
{
|
||||
byte buffer[] = new byte[bufferSize];
|
||||
@@ -237,10 +239,10 @@ public class IOUtil
|
||||
out.write(buffer, 0, len);
|
||||
}
|
||||
}
|
||||
|
||||
out.flush();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Method description
|
||||
*
|
||||
|
||||
@@ -29,6 +29,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
|
||||
package sonia.scm.web.filter;
|
||||
|
||||
//~--- JDK imports ------------------------------------------------------------
|
||||
|
||||
@@ -139,8 +139,7 @@ public abstract class PermissionFilter extends HttpFilter
|
||||
{
|
||||
boolean writeRequest = isWriteRequest(request);
|
||||
|
||||
if (PermissionUtil.hasPermission(repository,
|
||||
securityContext,
|
||||
if (PermissionUtil.hasPermission(repository, securityContext,
|
||||
writeRequest
|
||||
? PermissionType.WRITE
|
||||
: PermissionType.READ))
|
||||
|
||||
Reference in New Issue
Block a user