Revision 44831 trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.file/org.gvsig.fmap.dal.file.lib/src/main/java/org/gvsig/fmap/dal/serverexplorer/filesystem/impl/AbstractFilesystemServerExplorerProviderFactory.java
AbstractFilesystemServerExplorerProviderFactory.java | ||
---|---|---|
1 | 1 |
package org.gvsig.fmap.dal.serverexplorer.filesystem.impl; |
2 | 2 |
|
3 | 3 |
|
4 |
import java.io.File; |
|
5 |
|
|
6 |
import org.apache.commons.io.FilenameUtils; |
|
7 |
import org.apache.commons.lang3.StringUtils; |
|
8 |
import org.gvsig.fmap.dal.serverexplorer.filesystem.spi.FilesystemProviderServices; |
|
9 | 4 |
import org.gvsig.fmap.dal.serverexplorer.filesystem.spi.FilesystemServerExplorerProviderFactory; |
10 | 5 |
|
11 | 6 |
/** |
... | ... | |
14 | 9 |
* |
15 | 10 |
*/ |
16 | 11 |
public abstract class AbstractFilesystemServerExplorerProviderFactory |
17 |
implements FilesystemServerExplorerProviderFactory, FilesystemProviderServices{
|
|
12 |
implements FilesystemServerExplorerProviderFactory {
|
|
18 | 13 |
|
19 |
private FilesystemProviderServices services; |
|
14 |
private final String name; |
|
15 |
private final String description; |
|
20 | 16 |
|
21 |
public AbstractFilesystemServerExplorerProviderFactory(FilesystemProviderServices services){ |
|
22 |
this.services=services; |
|
17 |
public AbstractFilesystemServerExplorerProviderFactory(String name, String description){ |
|
18 |
this.name = name; |
|
19 |
this.description = description; |
|
23 | 20 |
} |
24 | 21 |
|
25 | 22 |
@Override |
26 | 23 |
public String getName() { |
27 |
return this.services.getName();
|
|
24 |
return this.name;
|
|
28 | 25 |
} |
29 | 26 |
|
30 | 27 |
@Override |
31 | 28 |
public String getDescription() { |
32 |
return this.services.getDescription();
|
|
29 |
return this.description;
|
|
33 | 30 |
} |
34 | 31 |
|
35 | 32 |
@Override |
36 | 33 |
public int allowCreate() { |
37 |
return this.services.allowCreate();
|
|
34 |
return UNKNOWN;
|
|
38 | 35 |
} |
39 | 36 |
|
40 | 37 |
@Override |
41 |
public int getMode(){
|
|
42 |
return this.services.getMode();
|
|
38 |
public boolean isHidden() {
|
|
39 |
return false;
|
|
43 | 40 |
} |
44 |
|
|
41 |
|
|
45 | 42 |
@Override |
46 |
public boolean isMode(int mode){ |
|
47 |
return this.services.isMode(mode);
|
|
43 |
public boolean isMode(int mode) {
|
|
44 |
return this.getMode()==mode;
|
|
48 | 45 |
} |
49 | 46 |
} |
Also available in: Unified diff