diff options
author | liboNet <libo.zhu@intel.com> | 2018-08-18 03:15:59 +0800 |
---|---|---|
committer | liboNet <libo.zhu@intel.com> | 2018-08-22 09:57:45 +0800 |
commit | 742c4b2ed82860e2a74f3db3b2048173fbc530d8 (patch) | |
tree | c663025f715682863056730c7dbccd8fd522ded7 /plugins/reception-plugins/src/main/java/org/onap/policy/distribution/reception/handling/sdc/exceptions | |
parent | 612196451afe9b16b8914858dd58f3bb0dae8579 (diff) |
integrate PSSDConfiguration to distribution
* Integrate the PSSDConfiguration to distribution config parameter.
* Moved related PSSDConfigurationParameterGroup classes from "handling"
to "parameters" to avoid specified sdc dependency.
* Modify all the test case since the distribution config parameter
has been changed, update CommonTestData to wrap it.
* Add neccessnary SDC handling exceptions which to be used for
SDC handler integration.
* update the PSSDCOnfiguraitonParameterGroup to add UUID to the setName
function to generate unique name for each instance.
* use builder to create PSSDConfigurationParametersGroup instead of using
many parameters
Change-Id: I3c78bc2a51ebc84761bc9458096d6ffa18070b47
Issue-ID: POLICY-956
Signed-off-by: liboNet <libo.zhu@intel.com>
Diffstat (limited to 'plugins/reception-plugins/src/main/java/org/onap/policy/distribution/reception/handling/sdc/exceptions')
4 files changed, 216 insertions, 0 deletions
diff --git a/plugins/reception-plugins/src/main/java/org/onap/policy/distribution/reception/handling/sdc/exceptions/ArtifactInstallerException.java b/plugins/reception-plugins/src/main/java/org/onap/policy/distribution/reception/handling/sdc/exceptions/ArtifactInstallerException.java new file mode 100644 index 00000000..043b0a41 --- /dev/null +++ b/plugins/reception-plugins/src/main/java/org/onap/policy/distribution/reception/handling/sdc/exceptions/ArtifactInstallerException.java @@ -0,0 +1,54 @@ +/*- + * ============LICENSE_START======================================================= + * Copyright (C) 2018 Intel. All rights reserved. + * ================================================================================ + * 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. + * + * SPDX-License-Identifier: Apache-2.0 + * ============LICENSE_END========================================================= + */ + +package org.onap.policy.distribution.reception.handling.sdc.exceptions; + + +/** + * Exception during artifact installation. + */ +public class ArtifactInstallerException extends Exception { + + /** + * serialization id. + */ + private static final long serialVersionUID = -8507246953751956974L; + + /** + * Constructor for creating ArtifactInstallerException using message. + * + * @param message The message to dump + */ + public ArtifactInstallerException (final String message) { + super (message); + + } + + /** + * Constructor for creating ArtifactInstallerException using message and exception. + * + * @param message The message to dump + * @param e the exception that caused this exception to be thrown + */ + public ArtifactInstallerException (final String message, final Exception e) { + super (message, e); + + } +} diff --git a/plugins/reception-plugins/src/main/java/org/onap/policy/distribution/reception/handling/sdc/exceptions/PSSDControllerException.java b/plugins/reception-plugins/src/main/java/org/onap/policy/distribution/reception/handling/sdc/exceptions/PSSDControllerException.java new file mode 100644 index 00000000..ff9acfd0 --- /dev/null +++ b/plugins/reception-plugins/src/main/java/org/onap/policy/distribution/reception/handling/sdc/exceptions/PSSDControllerException.java @@ -0,0 +1,54 @@ +/*- + * ============LICENSE_START======================================================= + * Copyright (C) 2018 Intel. All rights reserved. + * ================================================================================ + * 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. + * + * SPDX-License-Identifier: Apache-2.0 + * ============LICENSE_END========================================================= + */ + +package org.onap.policy.distribution.reception.handling.sdc.exceptions; + + +/** + * Exception of the PSSD controller. + */ +public class PSSDControllerException extends Exception { + + /** + * serialization id. + */ + private static final long serialVersionUID = -8507246953751956974L; + + /** + * Constructor for creating PSSDControllerException using message. + * + * @param message The message to dump + */ + public PSSDControllerException (final String message) { + super (message); + + } + + /** + * Constructor for creating PSSDControllerException using message and exception. + * + * @param message The message to dump + * @param e the exception that caused this exception to be thrown + */ + public PSSDControllerException (final String message, final Exception e) { + super (message, e); + + } +} diff --git a/plugins/reception-plugins/src/main/java/org/onap/policy/distribution/reception/handling/sdc/exceptions/PSSDDownloadException.java b/plugins/reception-plugins/src/main/java/org/onap/policy/distribution/reception/handling/sdc/exceptions/PSSDDownloadException.java new file mode 100644 index 00000000..f95179c1 --- /dev/null +++ b/plugins/reception-plugins/src/main/java/org/onap/policy/distribution/reception/handling/sdc/exceptions/PSSDDownloadException.java @@ -0,0 +1,54 @@ +/*- + * ============LICENSE_START======================================================= + * Copyright (C) 2018 Intel. All rights reserved. + * ================================================================================ + * 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. + * + * SPDX-License-Identifier: Apache-2.0 + * ============LICENSE_END========================================================= + */ + +package org.onap.policy.distribution.reception.handling.sdc.exceptions; + + +/** + * Exception during download from PSSD. + */ +public class PSSDDownloadException extends Exception { + + /** + * serialization id. + */ + private static final long serialVersionUID = -8507246953751956974L; + + /** + * Constructor for creating PSSDDownloadException using message. + * + * @param message The message to dump + */ + public PSSDDownloadException (final String message) { + super (message); + + } + + /** + * Constructor for creating PSSDDownloadException using message and exception. + * + * @param message The message to dump + * @param e the exception that caused this exception to be thrown + */ + public PSSDDownloadException (final String message, final Exception e) { + super (message, e); + + } +} diff --git a/plugins/reception-plugins/src/main/java/org/onap/policy/distribution/reception/handling/sdc/exceptions/PSSDParametersException.java b/plugins/reception-plugins/src/main/java/org/onap/policy/distribution/reception/handling/sdc/exceptions/PSSDParametersException.java new file mode 100644 index 00000000..91922d7d --- /dev/null +++ b/plugins/reception-plugins/src/main/java/org/onap/policy/distribution/reception/handling/sdc/exceptions/PSSDParametersException.java @@ -0,0 +1,54 @@ +/*- + * ============LICENSE_START======================================================= + * Copyright (C) 2018 Intel. All rights reserved. + * ================================================================================ + * 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. + * + * SPDX-License-Identifier: Apache-2.0 + * ============LICENSE_END========================================================= + */ + +package org.onap.policy.distribution.reception.handling.sdc.exceptions; + + +/** + * Exception of the PSSD controller. + */ +public class PSSDParametersException extends Exception { + + /** + * serialization id. + */ + private static final long serialVersionUID = -8507246953751956974L; + + /** + * Constructor for creating PSSDParametersException using message. + * + * @param message The message to dump + */ + public PSSDParametersException (final String message) { + super (message); + + } + + /** + * Constructor for creating PSSDParametersException using message and exception. + * + * @param message The message to dump + * @param e the exception that caused this exception to be thrown + */ + public PSSDParametersException (final String message, final Exception e) { + super (message, e); + + } +} |