public class DefaultScriptingFolder extends AbstractUnit implements ScriptingFolder
Modifier and Type | Field and Description |
---|---|
protected File |
folder |
changeListener, createdBy, description, id, manager, name, parent, saved, typename, version
Constructor and Description |
---|
DefaultScriptingFolder(ScriptingFolder parent,
ScriptingManager manager) |
DefaultScriptingFolder(ScriptingFolder parent,
ScriptingManager manager,
File folder) |
DefaultScriptingFolder(ScriptingFolder parent,
ScriptingManager manager,
URL folder) |
Modifier and Type | Method and Description |
---|---|
void |
accept(Visitor visitor)
Provides each value of this container to the provided
Visitor . |
void |
add(ScriptingUnit unit)
Adds a
ScriptingUnit to the ScriptingFolder. |
void |
create(ScriptingFolder folder,
String id) |
void |
create(ScriptingFolder folder,
String id,
String language) |
File |
getFile()
Gets a File with the ScriptUnit path name.
|
List<File> |
getFiles()
Return a list of the files that use this unit with out the inf file.
|
String[] |
getIconNames()
Gets the name of the icons associated to the ScriptingUnit type.
|
ScriptingFolder |
getParent()
Returns the ScriptingUnit's parent
|
Unit |
getUnit(File afile)
Returns the
ScriptingUnit associated with a File. |
List<ScriptingFolder> |
getUnitFolders() |
List<ScriptingUnit> |
getUnits()
Gets all the
ScriptingUnit s contained in a ScriptingFolder. |
void |
load(ScriptingFolder folder,
String id) |
boolean |
move(ScriptingFolder target)
Moves a ScriptingUnitfrom the current directory to the new location.
|
boolean |
remove() |
void |
remove(ScriptingUnit unit)
Removes a
ScriptingUnit from the ScriptingFolder. |
boolean |
rename(String newId)
Changes the ID of a ScriptingUnit and the name of the files and/or directories associated
|
addPropertyChangeListener, console_println, firePropertyChange, firePropertyChangeListener, getCreatedBy, getDescription, getFileResource, getId, getInfBoolean, getInfInt, getInfString, getInfValue, getManager, getName, getTypeName, getVersion, isSaved, loadInf, save, setCreatedBy, setDescription, setId, setName, setParent, setSaved, setVersion, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
addPropertyChangeListener, getCreatedBy, getDescription, getId, getName, getTypeName, getVersion, isSaved, setCreatedBy, setDescription, setName, setSaved, setVersion
protected File folder
public DefaultScriptingFolder(ScriptingFolder parent, ScriptingManager manager)
public DefaultScriptingFolder(ScriptingFolder parent, ScriptingManager manager, File folder)
public DefaultScriptingFolder(ScriptingFolder parent, ScriptingManager manager, URL folder)
public void create(ScriptingFolder folder, String id)
create
in class AbstractUnit
public File getFile()
ScriptingUnit
getFile
in interface ScriptingUnit
getFile
in class AbstractUnit
public List<File> getFiles()
ScriptingUnit
getFiles
in interface ScriptingUnit
public ScriptingFolder getParent()
ScriptingUnit
getParent
in interface ScriptingUnit
getParent
in class AbstractUnit
ScriptingFolder
where is contained the ScriptingUnitpublic Unit getUnit(File afile)
ScriptingFolder
ScriptingUnit
associated with a File.getUnit
in interface ScriptingFolder
afile
- File of the data origin.ScriptingUnit
with the content extracted from the file.public List<ScriptingUnit> getUnits()
ScriptingFolder
ScriptingUnit
s contained in a ScriptingFolder.getUnits
in interface ScriptingFolder
ScriptingUnit
s.public List<ScriptingFolder> getUnitFolders()
getUnitFolders
in interface ScriptingFolder
public void add(ScriptingUnit unit)
ScriptingFolder
ScriptingUnit
to the ScriptingFolder.add
in interface ScriptingFolder
unit
- ScriptingUnit
to include.public void remove(ScriptingUnit unit)
ScriptingFolder
ScriptingUnit
from the ScriptingFolder.remove
in interface ScriptingFolder
unit
- ScriptingUnit
to delete.public void load(ScriptingFolder folder, String id)
load
in interface Unit
load
in class AbstractUnit
public String[] getIconNames()
ScriptingUnit
getIconNames
in interface ScriptingUnit
public boolean remove()
remove
in interface ScriptingUnit
public void create(ScriptingFolder folder, String id, String language)
public boolean move(ScriptingFolder target)
ScriptingUnit
move
in interface ScriptingUnit
target
- ScriptingFolder
that represents the destination..public boolean rename(String newId)
ScriptingUnit
rename
in interface ScriptingUnit
newId
- String that contains the new Id.public void accept(Visitor visitor) throws BaseException
Visitable
Visitor
.accept
in interface Visitable
visitor
- the visitor to apply to each value.BaseException
- if there is an error while performing the visit