View Javadoc

1   /**
2    * Copyright 2005-2006 the original author or authors.
3    *
4    * Licensed under the Gnu General Pubic License, Version 2.0 (the
5    * "License"); you may not use this file except in compliance with
6    * the License. You may obtain a copy of the License at
7    *
8    *      http://www.opensource.org/licenses/gpl-license.php
9    *
10   * This program is distributed in the hope that it will be useful,
11   * but WITHOUT ANY WARRANTY; without even the implied warranty of
12   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
13   * See the Gnu General Public License for more details.
14   */
15  package org.figure8.join.services.remoting.beans;
16  
17  import java.util.Date;
18  import java.io.Serializable;
19  /**
20   * RemoteScriptLofInfo is a thin bean providing a remote view of a <code>ScriptLogInfo</code>
21   * of the script process managed by Join. This view only provides gettter methods.
22   * @author <a href="mailto:laurent.broudoux@free.fr">Laurent Broudoux</a>
23   * @version $Revision: 1.1 $
24   *
25   * @see org.figure8.join.services.scripting.ScriptLogInfo
26   */
27  public class RemoteScriptLogInfo implements Serializable{
28  
29     // Attributes ---------------------------------------------------------------
30  
31     /** The identifier of this script log infos */
32     private long id;
33     /** The date of creation of this log */
34     private Date creationDate;
35     /** The unique identifier of entity referenced by this log */
36     private long entityId;
37     /** The class of entity referenced by this log */
38     private String entityClass;
39     /** The path of file corresponding to log */
40     private String logFile;
41     /** The name of executed script */
42     private String scriptName;
43     /** The category of executed script */
44     private String scriptCategory;
45     /** The path of file corresponding to script */
46     private String scriptFile;
47     /** The exception message if script has failed */
48     private String exceptionMsg;
49  
50  
51     // Constructors -------------------------------------------------------------
52  
53     /**
54      * Creates a new instance of RemoteScriptLogInfo with mandatory attributes.
55      * @param id The identifier of script log infos
56      * @param creationDate The date of creation of this script log infos
57      * @param entityId The referenced entity object id
58      * @param entityClass The referenced entity object class
59      * @param logFile The path of file corresponding to log
60      * @param scriptName The name of the executed script
61      * @param scriptCategory The category of the executed script
62      * @param scriptFile The path of file containing executed script
63      */
64     public RemoteScriptLogInfo(long id, Date creationDate, long entityId, String entityClass, String logFile,
65                                   String scriptName, String scriptCategory, String scriptFile){
66        this.id = id;
67        this.creationDate = creationDate;
68        this.entityId = entityId;
69        this.entityClass = entityClass;
70        this.logFile = logFile;
71        this.scriptName = scriptName;
72        this.scriptCategory = scriptCategory;
73        this.scriptFile = scriptFile;
74     }
75  
76  
77     // Public -------------------------------------------------------------------
78  
79     /** @return The identifier of script log infos */
80     public long getId(){
81        return id;
82     }
83     /** @return The date of creation of this log */
84     public Date getCreationDate(){
85        return creationDate;
86     }
87     /** @return The referenced entity unique identifier */
88     public long getEntityId(){
89        return entityId;
90     }
91     /** @return The referenced entity class */
92     public String getEntityClass(){
93        return entityClass;
94     }
95     /** @return The path of file corresponding to log */
96     public String getLogFile(){
97        return logFile;
98     }
99     /** @return The name of executed script */
100    public String getScriptName(){
101       return scriptName;
102    }
103    /** @return The category of executed script */
104    public String getScriptCategory(){
105       return scriptCategory;
106    }
107    /** @return The path of file correcponding to script */
108    public String getScriptFile(){
109       return scriptFile;
110    }
111    /** @return The exception message if script has failed */
112    public String getExceptionMsg(){
113       return exceptionMsg;
114    }
115 }