public class DefaultScriptingFolder extends AbstractUnit implements ScriptingFolder
Modifier and Type | Field and Description |
---|---|
protected java.io.File |
folder |
changeListener, createdBy, description, id, manager, name, parent, saved, typename, version
Modifier | Constructor and Description |
---|---|
|
DefaultScriptingFolder(ScriptingFolder parent,
ScriptingManager manager,
java.io.File folder) |
protected |
DefaultScriptingFolder(ScriptingManager manager) |
Modifier and Type | Method and Description |
---|---|
void |
accept(Visitor visitor)
Provides each value of this container to the provided
Visitor . |
void |
accept(Visitor visitor,
java.util.function.Predicate<ScriptingUnit> includeFilter) |
void |
add(ScriptingUnit unit)
Adds a
ScriptingUnit to the ScriptingFolder. |
void |
create(ScriptingFolder folder,
java.lang.String id) |
void |
create(ScriptingFolder folder,
java.lang.String id,
java.lang.String language) |
Ini |
getConfig() |
Ini |
getConfig(java.io.File f) |
java.io.File |
getConfigFile() |
java.io.File |
getFile()
Gets a File with the ScriptUnit path name.
|
java.io.File |
getFileResource(java.lang.String extension) |
java.util.List<java.io.File> |
getFiles()
Return a list of the files that use this unit with out the inf file.
|
java.lang.String[] |
getIconNames()
Gets the name of the icons associated to the ScriptingUnit type.
|
ScriptingFolder |
getParent()
Returns the ScriptingUnit's parent
|
java.lang.String |
getProperty(java.lang.String group,
java.lang.String name) |
java.lang.String |
getRawInf() |
Unit |
getUnit(java.io.File afile)
Returns the
ScriptingUnit associated with a File. |
Unit |
getUnit(java.lang.String path) |
java.util.List<ScriptingFolder> |
getUnitFolders() |
java.util.List<ScriptingUnit> |
getUnits()
Gets all the
ScriptingUnit s contained in a ScriptingFolder. |
boolean |
isLink() |
void |
load(ScriptingFolder parent,
java.lang.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(java.lang.String newId)
Changes the ID of a ScriptingUnit and the name of the files and/or directories associated
|
void |
save() |
void |
setIconNames(java.lang.String iconName,
java.lang.String iconNameOpen) |
void |
setId(java.lang.String id) |
void |
setProperty(java.lang.String group,
java.lang.String name,
java.lang.String value) |
void |
setRawInf(java.lang.String rawInf) |
addPropertyChangeListener, console_println, equals, firePropertyChange, firePropertyChangeListener, getCreatedBy, getDescription, getId, getInfBoolean, getInfInt, getInfString, getInfValue, getManager, getName, getProperties, getProperty, getTypeName, getURL, getUserPath, getVersion, hashCode, isASystemUnit, isSaved, loadInf, reload, save, setCreatedBy, setDescription, setName, setParent, setProperty, setSaved, setVersion, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
addPropertyChangeListener, getCreatedBy, getDescription, getId, getName, getProperties, getProperty, getTypeName, getUserPath, getVersion, isASystemUnit, isSaved, reload, setCreatedBy, setDescription, setName, setProperty, setSaved, setVersion
protected DefaultScriptingFolder(ScriptingManager manager)
public DefaultScriptingFolder(ScriptingFolder parent, ScriptingManager manager, java.io.File folder)
public void create(ScriptingFolder folder, java.lang.String id)
create
in class AbstractUnit
public void create(ScriptingFolder folder, java.lang.String id, java.lang.String language)
public java.io.File getFile()
ScriptingUnit
getFile
in interface ScriptingUnit
getFile
in class AbstractUnit
public java.util.List<java.io.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(java.lang.String path)
getUnit
in interface ScriptingFolder
public Unit getUnit(java.io.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 java.util.List<ScriptingUnit> getUnits()
ScriptingFolder
ScriptingUnit
s contained in a ScriptingFolder.getUnits
in interface ScriptingFolder
ScriptingUnit
s.public java.util.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 java.io.File getFileResource(java.lang.String extension)
getFileResource
in interface ScriptingUnit
getFileResource
in class AbstractUnit
public java.io.File getConfigFile()
public Ini getConfig()
public Ini getConfig(java.io.File f)
public java.lang.String getProperty(java.lang.String group, java.lang.String name)
getProperty
in interface ScriptingFolder
public void setProperty(java.lang.String group, java.lang.String name, java.lang.String value)
setProperty
in interface ScriptingFolder
public void save()
save
in interface ScriptingFolder
public void load(ScriptingFolder parent, java.lang.String id)
load
in interface Unit
load
in class AbstractUnit
public java.lang.String[] getIconNames()
ScriptingUnit
getIconNames
in interface ScriptingUnit
public void setIconNames(java.lang.String iconName, java.lang.String iconNameOpen)
setIconNames
in interface ScriptingFolder
public boolean remove()
remove
in interface ScriptingUnit
public boolean move(ScriptingFolder target)
ScriptingUnit
move
in interface ScriptingUnit
target
- ScriptingFolder
that represents the destination..public boolean rename(java.lang.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 visitpublic boolean isLink()
isLink
in interface ScriptingFolder
public void accept(Visitor visitor, java.util.function.Predicate<ScriptingUnit> includeFilter) throws BaseException
accept
in interface ScriptingFolder
BaseException
public java.lang.String getRawInf()
getRawInf
in interface ScriptingFolder
public void setRawInf(java.lang.String rawInf)
setRawInf
in interface ScriptingFolder
public void setId(java.lang.String id)
setId
in interface Unit
setId
in class AbstractUnit