View Javadoc
1   /******************************************************************************
2    * SyncLogEntry.java - Describe an Sync event.
3    * 
4    * PicMan - The BuckoSoft Picture Manager in Java
5    * Copyright(c) 2008 - Dick Balaska
6    * 
7    */
8   package com.buckosoft.PicMan.domain;
9   
10  /** Describe an Sync event.
11   * @author Dick Balaska
12   * @since 2008/11/14
13   * @see <a href="http://cvs.buckosoft.com/Projects/java/PicMan/PicMan/src/com/buckosoft/PicMan/domain/SyncLogEntry.java">SyncLogEntry.java</a>
14   */
15  public class SyncLogEntry extends JobLogEntry {
16  
17  	public static final int FAILED		= JLELAST+1;
18  	public static final int FETCHPIC	= JLELAST+2;
19  	public static final int FETCHFILTER	= JLELAST+3;
20  	public static final int PUTPIC		= JLELAST+4;
21  	public static final int PUTFILTER	= JLELAST+5;
22  	public static final int CREATEDIR	= JLELAST+6;
23  
24  	public SyncLogEntry() {}
25  	
26  	public SyncLogEntry(int type, String name) {
27  		this.setType(type);
28  		this.setName(name);
29  	}
30  
31  	private	String	message = null;
32  
33  	/**
34  	 * @return the type as a string
35  	 */
36  	@Override
37  	public	String getTypeAsString() {
38  		switch (getType()) {
39  		case FAILED:
40  			return("Failed");
41  		case FETCHPIC:
42  			return("FetchPic");
43  		case FETCHFILTER:
44  			return("FetchFilter");
45  		case PUTPIC:
46  			return("PutPic");
47  		case PUTFILTER:
48  			return("PutFilter");
49  		case CREATEDIR:
50  			return("CreateDir");
51  		}
52  		return(super.getTypeAsString());
53  	}
54  
55  	/**
56  	 * @return the message
57  	 */
58  	public String getMessage() {
59  		return message;
60  	}
61  
62  	/**
63  	 * @param message the message to set
64  	 */
65  	public void setMessage(String message) {
66  		this.message = message;
67  	}
68  
69  	
70  }