Class DepotDelegator
- java.lang.Object
-
- com.perforce.p4java.impl.mapbased.server.cmd.BaseDelegator
-
- com.perforce.p4java.impl.mapbased.server.cmd.DepotDelegator
-
- All Implemented Interfaces:
IDepotDelegator
public class DepotDelegator extends BaseDelegator implements IDepotDelegator
DepotDelegator implementation.
-
-
Field Summary
-
Fields inherited from class com.perforce.p4java.impl.mapbased.server.cmd.BaseDelegator
MAX_LIMIT_SUPPORTED_MIN_VERSION, QUERY_EXPRESSIONS_SUPPORTED_MIN_VERSION, USER_RESTRICTIONS_SUPPORTED_MIN_VERSION
-
-
Constructor Summary
Constructors Constructor Description DepotDelegator(IOptionsServer server)
Instantiates a new depot delegator.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
createDepot(IDepot newDepot)
Create a new depot in the repository.java.lang.String
deleteDepot(java.lang.String name)
Delete a named depot from the repository.IDepot
getDepot(java.lang.String name)
Get an individual depot by name.
-
-
-
Constructor Detail
-
DepotDelegator
public DepotDelegator(IOptionsServer server)
Instantiates a new depot delegator.- Parameters:
server
- the server
-
-
Method Detail
-
createDepot
public java.lang.String createDepot(@Nonnull IDepot newDepot) throws P4JavaException
Description copied from interface:IDepotDelegator
Create a new depot in the repository. You must be an admin for this operation to succeed.- Specified by:
createDepot
in interfaceIDepotDelegator
- Parameters:
newDepot
- non-null IDepot object representing the depot to be created.- Returns:
- possibly-null operation result message string from the Perforce server.
- Throws:
P4JavaException
- if any error occurs in the processing of this method.
-
deleteDepot
public java.lang.String deleteDepot(java.lang.String name) throws P4JavaException
Description copied from interface:IDepotDelegator
Delete a named depot from the repository. You must be an admin for this operation to succeed.- Specified by:
deleteDepot
in interfaceIDepotDelegator
- Parameters:
name
- non-null IDepot object representing the depot to be deleted- Returns:
- possibly-null operation result message string from the Perforce server.
- Throws:
P4JavaException
- if any error occurs in the processing of this method.
-
getDepot
public IDepot getDepot(java.lang.String name) throws P4JavaException
Description copied from interface:IDepotDelegator
Get an individual depot by name. Note that this method will return a fake depot if you ask it for a non-existent depot, so it's not the most useful of operations.- Specified by:
getDepot
in interfaceIDepotDelegator
- Parameters:
name
- non-null name of the depot to be retrieved.- Returns:
- IDepot non-null object corresponding to the named depot if it exists and is retrievable; otherwise an IDepot object that looks real but does not, in fact, correspond to any known depot in the repository.
- Throws:
P4JavaException
- if any error occurs in the processing of this method.
-
-