View Javadoc

1   package net.sf.jpkgmk.prototype;
2   
3   
4   
5   
6   /**
7    * an exclusive directory accessible only by this package
8    * @author gommma (gommma AT users.sourceforge.net)
9    * @author Last changed by: $Author: gommma $
10   * @version $Revision: 2 $ $Date: 2008-08-20 21:14:19 +0200 (Mi, 20 Aug 2008) $
11   * @since 1.0
12   */
13  public class PrototypeEntryDirectoryExclusive extends PrototypeEntryDirectory {
14  
15  	/**
16  	 * Constructor taking the mandatory arguments to create a prototype file entry
17  	 * @param entryPath
18  	 */
19  	public PrototypeEntryDirectoryExclusive(String entryPath)
20  	{
21  		this(null, null, entryPath, null, null, null, null);
22  	}
23  
24  	/**
25  	 * Full constructor taking all arguments supported for this entry type
26  	 * @param part
27  	 * @param fileClass
28  	 * @param entryPath path to the file or directory
29  	 * @param entryPathSource the target path in that this file should have in the package
30  	 * @param perm
31  	 * @param owner
32  	 * @param group
33  	 */
34  	public PrototypeEntryDirectoryExclusive(Integer part, String fileClass, String entryPath, String perm, String owner, String group, PrototypeEntryCommandDefault entryCommandDefault)
35  	{
36  		super(part, PrototypeEntryType.X, fileClass, entryPath, null, perm, owner, group, entryCommandDefault);
37  		
38  		// Mandatory parameter check
39  		if(entryPath == null) {
40  			throw new NullPointerException("The parameter 'entryPath' must not be null");
41  		}
42  	}
43  
44  	
45  	
46  	public static class PrototypeEntryDirectoryExclusiveParser extends PrototypeEntryDirectoryParser implements PrototypeEntryParser
47  	{
48  
49  		public PrototypeEntryDirectoryExclusiveParser()
50  		{
51  			super();
52  		}
53  		
54  	    @Override
55  		protected PrototypeEntry createPrototypeEntry(Integer part, String fileClass,
56  				String path, String mode, String owner, String group,
57  				PrototypeEntryCommandDefault entryCommandDefault) {
58  			PrototypeEntryDirectoryExclusive entry = new PrototypeEntryDirectoryExclusive(part, fileClass, path, mode, owner, group, entryCommandDefault);
59  			return entry;
60  		}
61  		
62  	}
63  }