public class CloneChannelCommand extends CreateChannelCommand
access, archLabel, CHANNEL_LABEL_MIN_LENGTH, CHANNEL_LABEL_REGEX, CHANNEL_NAME_MAX_LENGTH, CHANNEL_NAME_MIN_LENGTH, CHANNEL_NAME_REGEX, checksum, description, globallySubscribable, GPG_FP_REGEX, GPG_KEY_REGEX, GPG_URL_REGEX, gpgKeyFp, gpgKeyId, gpgKeyUrl, label, maintainerEmail, maintainerName, maintainerPhone, name, parentId, parentLabel, REDHAT_REGEX, summary, supportPolicy, user, WEB_CHANNEL_CREATED
Constructor and Description |
---|
CloneChannelCommand(boolean originalStateIn,
Channel cloneFrom)
Constructor
|
Modifier and Type | Method and Description |
---|---|
Channel |
create()
Clones Channel based on the parameters that were set.
|
setAccess, setArchLabel, setChecksumLabel, setDescription, setGloballySubscribable, setGpgKeyFp, setGpgKeyId, setGpgKeyUrl, setLabel, setMaintainerEmail, setMaintainerName, setMaintainerPhone, setName, setParentChannel, setParentId, setParentLabel, setSummary, setSupportPolicy, setUser, validateChannel, verifyChannelLabel, verifyChannelName, verifyGpgInformation, verifyRequiredParameters
public CloneChannelCommand(boolean originalStateIn, Channel cloneFrom)
originalStateIn
- true to clone with no errata, false to clone with all erratacloneFrom
- channel to clone frompublic Channel create() throws InvalidChannelLabelException, InvalidChannelNameException, InvalidParentChannelException
create
in class CreateChannelCommand
InvalidChannelLabelException
- thrown if label is in use or invalid.InvalidChannelNameException
- throw if name is in use or invalid.java.lang.IllegalArgumentException
- thrown if label, name or user are null.InvalidParentChannelException
- thrown if parent label is not a
valid base channel.