1 /* 2 * Copyright 2012-2013 smartics, Kronseder & Reiner GmbH 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 package de.smartics.properties.resource.maven.repository; 17 18 import de.smartics.exceptions.i18n.message.MessageParam; 19 import de.smartics.properties.api.core.app.AbstractBaseMessageBean; 20 import de.smartics.properties.resource.domain.ArtifactId; 21 22 /** 23 * Provides context information for transfer problems dealing with an artifact. 24 */ 25 public class ArtifactIdMessageBean extends AbstractBaseMessageBean 26 { 27 // ********************************* Fields ********************************* 28 29 // --- constants ------------------------------------------------------------ 30 31 /** 32 * The class version identifier. 33 */ 34 private static final long serialVersionUID = 1L; 35 36 // --- members -------------------------------------------------------------- 37 38 /** 39 * The artifact with problems. 40 * 41 * @serial 42 */ 43 @MessageParam 44 private final ArtifactId artifactId; // NOPMD 45 46 // ****************************** Initializer ******************************* 47 48 // ****************************** Constructors ****************************** 49 50 /** 51 * Constructor without cause. 52 * 53 * @param artifactId the key to the configuration that signaled problems. 54 */ 55 public ArtifactIdMessageBean(ArtifactId artifactId) 56 { 57 this(null, artifactId); 58 } 59 60 /** 61 * Default constructor. 62 * 63 * @param cause the cause to the problem. 64 * @param artifactId the key to the configuration that signaled problems. 65 */ 66 public ArtifactIdMessageBean(final Throwable cause, 67 final ArtifactId artifactId) 68 { 69 super(MavenResourceCode.ARTIFACT_RESOLVING_FAILED, cause); 70 this.artifactId = artifactId; 71 } 72 73 // ****************************** Inner Classes ***************************** 74 75 // ********************************* Methods ******************************** 76 77 // --- init ----------------------------------------------------------------- 78 79 // --- factory -------------------------------------------------------------- 80 81 // --- get&set -------------------------------------------------------------- 82 83 // --- business ------------------------------------------------------------- 84 85 // --- object basics -------------------------------------------------------- 86 87 }