01: package com.sun.portal.netfile.applet.java2.model;
02:
03: import java.util.HashMap;
04:
05: public class ShareNode extends ShareFolderNode {
06:
07: private static final String ICON_NAME = "Sharedmachine_16.gif";
08: private static final String OPEN_ICON_NAME = "Sharedmachine_16.gif";
09:
10: private String password;
11:
12: public ShareNode(String name, String password) {
13: super (name, ICON_NAME, OPEN_ICON_NAME);
14: this .password = password;
15:
16: }
17:
18: public String getPassword() {
19: return (password == null) ? "" : password;
20: }
21:
22: public void setPassword(String password) {
23: this .password = password;
24: }
25:
26: public void addFolderNode(FolderNode folderNode) {
27: if (folderNode.getType() != FolderNode.FOLDER) {
28: throw new IllegalArgumentException(
29: "model.ShareNode:addFolderNode : can only add a folder");
30: }
31: addChildNode(folderNode);
32: }
33:
34: public ShareNode getShareNode() {
35: return this ;
36: }
37:
38: public SystemNode getSystemNode() {
39: return (SystemNode) getParent();
40:
41: }
42:
43: public String getFQDirectoryName() {
44: return "";
45: }
46:
47: }
|