Removed classes with no reference

- org.apache.cloudstack.framework.jobs.JobCancellationException (removed
variable JobCancellationException in com.cloud.utils.SerialVersionUID)
- org.apache.cloudstack.ldap.NoSuchLdapUserException (removed test file
/cloud-plugin-user-authenticator-ldap/test/groovy/org/apache/cloudstack/ldap/NoSuchLdapUserExceptionSpec.groovy)
- com.cloud.agent.api.storage.CreateVolumeOVAAnswer
- com.cloud.exception.MissingParameterValueException
- org.apache.cloudstack.api.response.StatusResponse
- org.apache.cloudstack.api.response.VolumeDetailResponse
- org.apache.cloudstack.api.response.UpgradeVmResponse
- org.apache.cloudstack.api.response.AddIpToVmNicResponse
- org.apache.cloudstack.api.response.TemplateZoneResponse (at
org.apache.cloudstack.api.response.TemplateResponse, there is this
comment "To avoid breaking backwards compatibility, we still treat a
template at different zones as different templates, so not embedding
template_zone information in this TemplateZoneResponse set. `private
Set<TemplateZoneResponse> zones;`" but right now it is not used)
- org.apache.cloudstack.api.response.NicDetailResponse
This commit is contained in:
weingartner 2016-04-07 15:28:55 -03:00
parent f960725dd5
commit 4179606c0b
14 changed files with 1 additions and 925 deletions

View File

@ -1,26 +0,0 @@
// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use this file except in compliance
// with the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing,
// software distributed under the License is distributed on an
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, either express or implied. See the License for the
// specific language governing permissions and limitations
// under the License.
package com.cloud.agent.api.storage;
import com.cloud.agent.api.Answer;
public class CreateVolumeOVAAnswer extends Answer {
public CreateVolumeOVAAnswer(CreateVolumeOVACommand cmd, boolean result, String details) {
super(cmd, result, details);
}
}

View File

@ -1,26 +0,0 @@
// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use this file except in compliance
// with the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing,
// software distributed under the License is distributed on an
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, either express or implied. See the License for the
// specific language governing permissions and limitations
// under the License.
package com.cloud.agent.api.storage;
import com.cloud.agent.api.Answer;
public class PrepareOVAPackingAnswer extends Answer {
public PrepareOVAPackingAnswer(PrepareOVAPackingCommand cmd, boolean result, String details) {
super(cmd, result, details);
}
}

View File

@ -1,26 +0,0 @@
// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use this file except in compliance
// with the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing,
// software distributed under the License is distributed on an
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, either express or implied. See the License for the
// specific language governing permissions and limitations
// under the License.
package com.cloud.exception;
import com.cloud.utils.exception.CloudRuntimeException;
public class MissingParameterValueException extends CloudRuntimeException {
public MissingParameterValueException(String message) {
super(message);
}
}

View File

@ -1,88 +0,0 @@
// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use this file except in compliance
// with the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing,
// software distributed under the License is distributed on an
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, either express or implied. See the License for the
// specific language governing permissions and limitations
// under the License.
package org.apache.cloudstack.api.response;
import com.google.gson.annotations.SerializedName;
import org.apache.cloudstack.api.ApiConstants;
import org.apache.cloudstack.api.BaseResponse;
import com.cloud.serializer.Param;
@SuppressWarnings("unused")
public class AddIpToVmNicResponse extends BaseResponse {
@SerializedName(ApiConstants.ID)
@Param(description = "the ID of the secondary private IP addr")
private Long id;
@SerializedName(ApiConstants.IP_ADDRESS)
@Param(description = "Secondary IP address")
private String ipAddr;
@SerializedName(ApiConstants.NIC_ID)
@Param(description = "the ID of the nic")
private Long nicId;
@SerializedName(ApiConstants.NETWORK_ID)
@Param(description = "the ID of the network")
private Long nwId;
@SerializedName(ApiConstants.VIRTUAL_MACHINE_ID)
@Param(description = "the ID of the vm")
private Long vmId;
public Long getId() {
return id;
}
public String getIpAddr() {
return ipAddr;
}
public void setIpAddr(String ipAddr) {
this.ipAddr = ipAddr;
}
public Long getNicId() {
return nicId;
}
public void setNicId(Long nicId) {
this.nicId = nicId;
}
public Long getNwId() {
return nwId;
}
public void setNwId(Long nwId) {
this.nwId = nwId;
}
public Long getVmId() {
return vmId;
}
public void setVmId(Long vmId) {
this.vmId = vmId;
}
public Long setId(Long id) {
return id;
}
}

View File

@ -1,76 +0,0 @@
// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use this file except in compliance
// with the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing,
// software distributed under the License is distributed on an
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, either express or implied. See the License for the
// specific language governing permissions and limitations
// under the License.
package org.apache.cloudstack.api.response;
import com.google.gson.annotations.SerializedName;
import org.apache.cloudstack.api.ApiConstants;
import org.apache.cloudstack.api.BaseResponse;
import com.cloud.serializer.Param;
@SuppressWarnings("unused")
public class NicDetailResponse extends BaseResponse {
@SerializedName(ApiConstants.ID)
@Param(description = "ID of the nic")
private String id;
@SerializedName(ApiConstants.NAME)
@Param(description = "name of the nic detail")
private String name;
@SerializedName(ApiConstants.VALUE)
@Param(description = "value of the nic detail")
private String value;
@SerializedName(ApiConstants.DISPLAY_NIC)
@Param(description = "an optional field whether to the display the nic to the end user or not.")
private Boolean displayNic;
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getValue() {
return value;
}
public void setValue(String value) {
this.value = value;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public Boolean getDisplayNic() {
return displayNic;
}
public void setDisplayNic(Boolean displayNic) {
this.displayNic = displayNic;
}
}

View File

@ -1,34 +0,0 @@
// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use this file except in compliance
// with the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing,
// software distributed under the License is distributed on an
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, either express or implied. See the License for the
// specific language governing permissions and limitations
// under the License.
package org.apache.cloudstack.api.response;
import com.google.gson.annotations.SerializedName;
import org.apache.cloudstack.api.BaseResponse;
public class StatusResponse extends BaseResponse {
@SerializedName("status")
private Boolean status;
public Boolean getStatus() {
return status;
}
public void setStatus(Boolean status) {
this.status = status;
}
}

View File

@ -21,8 +21,6 @@ import java.util.LinkedHashSet;
import java.util.Map;
import java.util.Set;
import com.google.gson.annotations.SerializedName;
import org.apache.cloudstack.api.ApiConstants;
import org.apache.cloudstack.api.BaseResponseWithTagInformation;
import org.apache.cloudstack.api.EntityReference;
@ -30,6 +28,7 @@ import org.apache.cloudstack.api.EntityReference;
import com.cloud.serializer.Param;
import com.cloud.storage.Storage.ImageFormat;
import com.cloud.template.VirtualMachineTemplate;
import com.google.gson.annotations.SerializedName;
@EntityReference(value = VirtualMachineTemplate.class)
@SuppressWarnings("unused")
@ -170,11 +169,6 @@ public class TemplateResponse extends BaseResponseWithTagInformation implements
@Param(description = "additional key/value details tied with template")
private Map details;
// To avoid breaking backwards compatibility, we still treat a template at different zones as different templates, so not embedding
// template_zone information in this TemplateZoneResponse set.
// @SerializedName("zones") @Param(description="list of zones associated with tempate", responseObject = TemplateZoneResponse.class)
// private Set<TemplateZoneResponse> zones;
@SerializedName(ApiConstants.SSHKEY_ENABLED)
@Param(description = "true if template is sshkey enabled, false otherwise")
private Boolean sshKeyEnabled;
@ -184,7 +178,6 @@ public class TemplateResponse extends BaseResponseWithTagInformation implements
private Boolean isDynamicallyScalable;
public TemplateResponse() {
// zones = new LinkedHashSet<TemplateZoneResponse>();
tags = new LinkedHashSet<ResourceTagResponse>();
}

View File

@ -1,134 +0,0 @@
// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use this file except in compliance
// with the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing,
// software distributed under the License is distributed on an
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, either express or implied. See the License for the
// specific language governing permissions and limitations
// under the License.
package org.apache.cloudstack.api.response;
import java.util.Date;
import com.google.gson.annotations.SerializedName;
import org.apache.cloudstack.api.ApiConstants;
import org.apache.cloudstack.api.BaseResponse;
import com.cloud.serializer.Param;
public class TemplateZoneResponse extends BaseResponse {
@SerializedName(ApiConstants.ZONE_ID)
@Param(description = "the ID of the zone for the template")
private String zoneId;
@SerializedName(ApiConstants.ZONE_NAME)
@Param(description = "the name of the zone for the template")
private String zoneName;
@SerializedName(ApiConstants.STATUS)
@Param(description = "the status of the template")
private String status;
@SerializedName(ApiConstants.IS_READY)
// propName="ready" (FIXME: this used to be part of Param annotation, do we need it?)
@Param(description = "true if the template is ready to be deployed from, false otherwise.")
private boolean isReady;
@SerializedName(ApiConstants.CREATED)
@Param(description = "the date this template was created")
private Date created;
public TemplateZoneResponse() {
super();
}
public TemplateZoneResponse(String zoneId, String zoneName) {
super();
this.zoneId = zoneId;
this.zoneName = zoneName;
}
public String getZoneId() {
return zoneId;
}
public void setZoneId(String zoneId) {
this.zoneId = zoneId;
}
public String getZoneName() {
return zoneName;
}
public void setZoneName(String zoneName) {
this.zoneName = zoneName;
}
public String getStatus() {
return status;
}
public void setStatus(String status) {
this.status = status;
}
public boolean isReady() {
return isReady;
}
public void setReady(boolean isReady) {
this.isReady = isReady;
}
public Date getCreated() {
return created;
}
public void setCreated(Date created) {
this.created = created;
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
String oid = this.getZoneId();
result = prime * result + ((oid == null) ? 0 : oid.hashCode());
return result;
}
@Override
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (obj == null) {
return false;
}
if (getClass() != obj.getClass()) {
return false;
}
TemplateZoneResponse other = (TemplateZoneResponse)obj;
String oid = this.getZoneId();
if (oid == null) {
if (other.getZoneId() != null) {
return false;
}
} else if (!oid.equals(other.getZoneId())) {
return false;
} else if (this.getZoneName().equals(other.getZoneName())) {
return false;
}
return true;
}
}

View File

@ -1,323 +0,0 @@
// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use this file except in compliance
// with the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing,
// software distributed under the License is distributed on an
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, either express or implied. See the License for the
// specific language governing permissions and limitations
// under the License.
package org.apache.cloudstack.api.response;
import java.util.Date;
import com.google.gson.annotations.SerializedName;
import org.apache.cloudstack.api.ApiConstants;
import org.apache.cloudstack.api.BaseResponse;
import com.cloud.serializer.Param;
public class UpgradeVmResponse extends BaseResponse {
@SerializedName("id")
private String id;
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public Date getCreated() {
return created;
}
public void setCreated(Date created) {
this.created = created;
}
public String getIpAddress() {
return ipAddress;
}
public void setIpAddress(String ipAddress) {
this.ipAddress = ipAddress;
}
public String getState() {
return state;
}
public void setState(String state) {
this.state = state;
}
public String getAccount() {
return account;
}
public void setAccount(String account) {
this.account = account;
}
public String getDomainId() {
return domainId;
}
public void setDomainId(String domainId) {
this.domainId = domainId;
}
public String getDomain() {
return domain;
}
public void setDomain(String domain) {
this.domain = domain;
}
public boolean isHaEnable() {
return haEnable;
}
public void setHaEnable(boolean haEnable) {
this.haEnable = haEnable;
}
public String getZoneId() {
return zoneId;
}
public void setZoneId(String zoneId) {
this.zoneId = zoneId;
}
public String getDisplayName() {
return displayName;
}
public void setDisplayName(String displayName) {
this.displayName = displayName;
}
public String getZoneName() {
return zoneName;
}
public void setZoneName(String zoneName) {
this.zoneName = zoneName;
}
public String getHostId() {
return hostId;
}
public void setHostId(String hostId) {
this.hostId = hostId;
}
public String getHostName() {
return hostName;
}
public void setHostName(String hostName) {
this.hostName = hostName;
}
public String getTemplateId() {
return templateId;
}
public void setTemplateId(String templateId) {
this.templateId = templateId;
}
public String getTemplateName() {
return templateName;
}
public void setTemplateName(String templateName) {
this.templateName = templateName;
}
public String getTemplateDisplayText() {
return templateDisplayText;
}
public void setTemplateDisplayText(String templateDisplayText) {
this.templateDisplayText = templateDisplayText;
}
public boolean isPasswordEnabled() {
return passwordEnabled;
}
public void setPasswordEnabled(boolean passwordEnabled) {
this.passwordEnabled = passwordEnabled;
}
public String getServiceOfferingId() {
return serviceOfferingId;
}
public void setServiceOfferingId(String serviceOfferingId) {
this.serviceOfferingId = serviceOfferingId;
}
public String getServiceOfferingName() {
return serviceOfferingName;
}
public void setServiceOfferingName(String serviceOfferingName) {
this.serviceOfferingName = serviceOfferingName;
}
public long getCpuSpeed() {
return cpuSpeed;
}
public void setCpuSpeed(long cpuSpeed) {
this.cpuSpeed = cpuSpeed;
}
public long getMemory() {
return memory;
}
public void setMemory(long memory) {
this.memory = memory;
}
public long getCpuUsed() {
return cpuUsed;
}
public void setCpuUsed(long cpuUsed) {
this.cpuUsed = cpuUsed;
}
public long getNetworkKbsRead() {
return networkKbsRead;
}
public void setNetworkKbsRead(long networkKbsRead) {
this.networkKbsRead = networkKbsRead;
}
public long getNetworkKbsWrite() {
return networkKbsWrite;
}
public void setNetworkKbsWrite(long networkKbsWrite) {
this.networkKbsWrite = networkKbsWrite;
}
public String isId() {
return id;
}
@SerializedName("name")
@Param(description = "the ID of the virtual machine")
private String name;
@SerializedName("created")
@Param(description = "the date when this virtual machine was created")
private Date created;
@SerializedName("ipaddress")
@Param(description = "the ip address of the virtual machine")
private String ipAddress;
@SerializedName("state")
@Param(description = "the state of the virtual machine")
private String state;
@SerializedName("account")
@Param(description = "the account associated with the virtual machine")
private String account;
@SerializedName("domainid")
@Param(description = "the ID of the domain in which the virtual machine exists")
private String domainId;
@SerializedName("domain")
@Param(description = "the name of the domain in which the virtual machine exists")
private String domain;
@SerializedName("haenable")
@Param(description = "true if high-availability is enabled, false otherwise")
private boolean haEnable;
@SerializedName("zoneid")
@Param(description = "the ID of the availablility zone for the virtual machine")
private String zoneId;
@SerializedName("displayname")
@Param(description = "user generated name. The name of the virtual machine is returned if no displayname exists.")
private String displayName;
@SerializedName(ApiConstants.ZONE_NAME)
@Param(description = "the name of the availability zone for the virtual machine")
private String zoneName;
@SerializedName("hostid")
@Param(description = "the ID of the host for the virtual machine")
private String hostId;
@SerializedName("hostname")
@Param(description = "the name of the host for the virtual machine")
private String hostName;
@SerializedName("templateid")
@Param(description = "the ID of the template for the virtual machine. A -1 is returned if the virtual machine was created from an ISO file.")
private String templateId;
@SerializedName("templatename")
@Param(description = "the name of the template for the virtual machine")
private String templateName;
@SerializedName("templatedisplaytext")
@Param(description = " an alternate display text of the template for the virtual machine")
private String templateDisplayText;
@SerializedName("passwordenabled")
@Param(description = "true if the password rest feature is enabled, false otherwise")
private boolean passwordEnabled;
@SerializedName("serviceofferingid")
@Param(description = "the ID of the service offering of the virtual machine")
private String serviceOfferingId;
@SerializedName("serviceofferingname")
@Param(description = "the name of the service offering of the virtual machine")
private String serviceOfferingName;
@SerializedName("cpunumber")
@Param(description = "the number of cpu this virtual machine is running with")
private long cpuSpeed;
@SerializedName("memory")
@Param(description = "the memory allocated for the virtual machine")
private long memory;
@SerializedName("cpuused")
@Param(description = "the amount of the vm's CPU currently used")
private long cpuUsed;
@SerializedName("networkkbsread")
@Param(description = "the incoming network traffic on the vm")
private long networkKbsRead;
@SerializedName("networkkbswrite")
@Param(description = "the outgoing network traffic on the host")
private long networkKbsWrite;
}

View File

@ -1,76 +0,0 @@
// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use this file except in compliance
// with the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing,
// software distributed under the License is distributed on an
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, either express or implied. See the License for the
// specific language governing permissions and limitations
// under the License.
package org.apache.cloudstack.api.response;
import com.google.gson.annotations.SerializedName;
import org.apache.cloudstack.api.ApiConstants;
import org.apache.cloudstack.api.BaseResponse;
import com.cloud.serializer.Param;
@SuppressWarnings("unused")
public class VolumeDetailResponse extends BaseResponse {
@SerializedName(ApiConstants.ID)
@Param(description = "ID of the volume")
private String id;
@SerializedName(ApiConstants.NAME)
@Param(description = "name of the volume detail")
private String name;
@SerializedName(ApiConstants.VALUE)
@Param(description = "value of the volume detail")
private String value;
@SerializedName(ApiConstants.DISPLAY_VOLUME)
@Param(description = "an optional field whether to the display the volume to the end user or not.")
private Boolean displayVm;
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getValue() {
return value;
}
public void setValue(String value) {
this.value = value;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public Boolean getDisplayVm() {
return displayVm;
}
public void setDisplayVm(Boolean displayVm) {
this.displayVm = displayVm;
}
}

View File

@ -1,46 +0,0 @@
// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use this file except in compliance
// with the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing,
// software distributed under the License is distributed on an
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, either express or implied. See the License for the
// specific language governing permissions and limitations
// under the License.
package org.apache.cloudstack.framework.jobs;
import java.util.concurrent.CancellationException;
import com.cloud.utils.SerialVersionUID;
/**
* This exception is fired when the job has been cancelled
*
*/
public class JobCancellationException extends CancellationException {
private static final long serialVersionUID = SerialVersionUID.AffinityConflictException;
public enum Reason {
RequestedByUser, RequestedByCaller, TimedOut;
}
Reason reason;
public JobCancellationException(Reason reason) {
super("The job was cancelled due to " + reason.toString());
this.reason = reason;
}
public Reason getReason() {
return reason;
}
}

View File

@ -1,31 +0,0 @@
// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use this file except in compliance
// with the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing,
// software distributed under the License is distributed on an
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, either express or implied. See the License for the
// specific language governing permissions and limitations
// under the License.
package org.apache.cloudstack.ldap;
public class NoSuchLdapUserException extends Exception {
private static final long serialVersionUID = 6782938919658010900L;
private final String username;
public NoSuchLdapUserException(final String username) {
super("No such user: " + username);
this.username = username;
}
public String getUsername() {
return username;
}
}

View File

@ -1,30 +0,0 @@
// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use this file except in compliance
// with the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing,
// software distributed under the License is distributed on an
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, either express or implied. See the License for the
// specific language governing permissions and limitations
// under the License.
package groovy.org.apache.cloudstack.ldap
import org.apache.cloudstack.ldap.NoSuchLdapUserException;
class NoSuchLdapUserExceptionSpec extends spock.lang.Specification {
def "Test that the username is correctly set within the No such LDAP user exception object"() {
given: "You have created an No such LDAP user exception object with the username set"
def exception = new NoSuchLdapUserException(username)
expect: "The username is equal to the given data source"
exception.getUsername() == username
where: "The username is set to "
username << ["", null, "rmurphy"]
}
}

View File

@ -65,7 +65,6 @@ public interface SerialVersionUID {
public static final long CallFailedException = Base | 0x28;
public static final long UnableDeleteHostException = Base | 0x29;
public static final long AffinityConflictException = Base | 0x2a;
public static final long JobCancellationException = Base | 0x2b;
public static final long NioConnectionException = Base | 0x2c;
public static final long TaskExecutionException = Base | 0x2d;
}