*/
package org.onap.vnfsdk.marketplace.db.exception;
-
public class ErrorCodeException extends Exception {
- private static final long serialVersionUID = 3220072444842529499L;
- private final int categoryCode;
- private final int errorCode;
- private final String[] arguments;
-
-
- public ErrorCodeException(int code, String debugMessage) {
- this(code, debugMessage, null);
- }
-
- /**
- * error code exception.
- * @param code error code
- * @param debugMessage debug message
- * @param arguments arguments
- */
- public ErrorCodeException(int code, String debugMessage, String[] arguments) {
- super(debugMessage);
- this.errorCode = code;
- this.arguments = arguments;
- this.categoryCode = 0;
- }
-
-
- public ErrorCodeException(Throwable source, int code) {
- this(source, code, (String[]) null);
- }
-
- /**
- * error code exception.
- * @param source Throwable
- * @param code error code
- * @param arguments arguments
- */
- public ErrorCodeException(Throwable source, int code, String[] arguments) {
- super(source);
- this.errorCode = code;
- this.arguments = arguments;
- this.categoryCode = 0;
- }
-
-
- public ErrorCodeException(Throwable source, int code, String debugMessage) {
- this(source, code, debugMessage, null);
- }
-
- /**
- * error code exception.
- * @param source Throwable
- * @param code error code
- * @param debugMessage debug message
- * @param arguments arguments
- */
- public ErrorCodeException(Throwable source, int code, String debugMessage, String[] arguments) {
- super(debugMessage, source);
- this.errorCode = code;
- this.arguments = arguments;
- this.categoryCode = 0;
- }
-
-
- public ErrorCodeException(int category, int code, String debugMessage) {
- this(category, code, debugMessage, null);
- }
-
+ private static final long serialVersionUID = 3220072444842529499L;
+ private final int errorCode;
- public ErrorCodeException(int category, int code, String debugMessage, String[] arguments) {
- super(debugMessage);
- this.categoryCode = category;
- this.errorCode = code;
- this.arguments = arguments;
- }
+ public ErrorCodeException(Throwable source, int category, int code, String debugMessage, String[] arguments) {
+ super(debugMessage, source);
+ this.errorCode = code;
+ }
-
- public ErrorCodeException(Throwable source, int category, int code) {
- this(source, category, code, (String[]) null);
- }
-
-
- public ErrorCodeException(Throwable source, int category, int code, String[] arguments) {
- super(source);
- this.categoryCode = category;
- this.errorCode = code;
- this.arguments = arguments;
- }
-
-
- public ErrorCodeException(Throwable source, int category, int code, String debugMessage) {
- this(source, category, code, debugMessage, null);
- }
-
-
- public ErrorCodeException(Throwable source, int category, int code, String debugMessage,
- String[] arguments) {
- super(debugMessage, source);
- this.categoryCode = category;
- this.errorCode = code;
- this.arguments = arguments;
- }
-
-
- public int getCategory() {
- return categoryCode;
- }
-
- public int getErrorCode() {
- return errorCode;
- }
-
-
- public String[] getArguments() {
- return arguments;
- }
+ public int getErrorCode() {
+ return errorCode;
+ }
}
-
private static final long serialVersionUID = 5699508780537383310L;
- public MarketplaceResourceException(int errcode) {
- super(errcode, "");
- }
-
-
- public MarketplaceResourceException(int errcode, Throwable cause) {
- super(cause, errcode);
- }
-
-
- public MarketplaceResourceException(int errcode, String message, Throwable cause) {
- super(cause, errcode, message);
- }
-
-
- public MarketplaceResourceException() {
- super(9999999, null);
- }
-
-
- public MarketplaceResourceException(String message) {
- super(9999999, message);
- }
-
-
- public MarketplaceResourceException(Throwable cause) {
- super(cause, 9999999);
- }
-
-
- public MarketplaceResourceException(String message, Throwable cause) {
- super(cause, 9999999, message);
- }
-
-
- /**
- * catalog resource exception.
- * @param source throwable source
- * @param errId error Id
- * @param debugMessage debug message
- * @param arguments arguments
- */
- public MarketplaceResourceException(Throwable source, int errId, String debugMessage,
- String[] arguments) {
- super(source, errId, debugMessage, arguments);
- }
-
public MarketplaceResourceException(Throwable source, int category, int code, String debugMessage,
String[] arguments) {
super(source, category, code, debugMessage, arguments);
+++ /dev/null
-/**
- * Copyright 2017 Huawei Technologies Co., Ltd.
- *
- * Licensed 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.onap.vnfsdk.marketplace.onboarding.hooks.validatelifecycle;
-
-public class VmsInfo {
-
- // Virtual machine ip address
- private String ip;
-
- // Login username
- private String username;
-
- // Login password
- private String passwd;
-
- public String getIp() {
- return ip;
- }
-
- public void setIp(String ip) {
- this.ip = ip;
- }
-
- public String getUsername() {
- return username;
- }
-
- public void setUsername(String username) {
- this.username = username;
- }
-
- public String getPassword() {
- return passwd;
- }
-
- public void setPassword(String password) {
- this.passwd = password;
- }
-}
+++ /dev/null
-/**
- * Copyright 2017 Huawei Technologies Co., Ltd.
- *
- * Licensed 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.onap.vnfsdk.marketplace.onboarding.hooks.validatelifecycle;
-
-import java.util.List;
-
-public class VnfInfo {
-
- // List of VM Info -Each VNF can run in several VMs
- private List<VmsInfo> vms;
-
- public List<VmsInfo> getVms() {
- return vms;
- }
-
- public void setVms(List<VmsInfo> vms) {
- this.vms = vms;
- }
-}