Salome HOME
3ca7bc95ae04c9482464ffc5379458edf76b61cb
[tools/siman.git] / Workspace / Siman-Common / src / org / splat / exception / DocumentIsUsedException.java
1 /*****************************************************************************
2  * Company         OPEN CASCADE
3  * Application     SIMAN
4  * File            $Id$ 
5  * Creation date   25.12.2012
6  * @author         $Author$
7  * @version        $Revision$
8  * @copyright      OPEN CASCADE 2012-2014
9  *****************************************************************************/
10
11 package org.splat.exception;
12
13 import org.splat.common.properties.MessageKeyEnum;
14
15 /**
16  * This exception is thrown when trying to delete a document used by other documents.
17  * 
18  * @author <a href="mailto:roman.kozlov@opencascade.com">Roman Kozlov (RKV)</a>
19  */
20 public class DocumentIsUsedException extends BusinessException {
21
22         /**
23          * Serial version ID.
24          */
25         private static final long serialVersionUID = 8835396863040438781L;
26
27         /**
28          * Error message key.
29          */
30         private static final MessageKeyEnum MESSAGE_KEY = MessageKeyEnum.DCT_000002;
31
32         /**
33          * The document title.
34          */
35         private transient final String _documentTitle;
36         /**
37          * Constructor with document title as a parameter.
38          * 
39          * @param documentTitle
40          *            the document title
41          */
42         public DocumentIsUsedException(final String documentTitle) {
43                 super(MESSAGE_KEY.toString(), documentTitle);
44                 _documentTitle = documentTitle;
45         }
46         /**
47          * Get the document title.
48          * @return the document title
49          */
50         public String getDocumentTitle() {
51                 return _documentTitle;
52         }
53 }