public class DefaultScriptingExternalFile extends AbstractUnit implements ScriptingExternalFile
changeListener, createdBy, description, id, logger, manager, name, parent, saved, typename, version
Constructor and Description |
---|
DefaultScriptingExternalFile(ScriptingFolder parent,
ScriptingManager manager,
String id) |
Modifier and Type | Method and Description |
---|---|
void |
create(ScriptingFolder folder,
String id) |
void |
create(ScriptingFolder folder,
String id,
String language) |
String |
getContentsAsText() |
File |
getExternalFile() |
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.
|
String |
getMimeType() |
void |
load(ScriptingFolder folder,
String id) |
boolean |
move(ScriptingFolder target)
Moves a ScriptingUnitfrom the current directory to the new location.
|
boolean |
remove() |
boolean |
rename(String newId)
Changes the ID of a ScriptingUnit and the name of the files and/or directories associated
|
void |
setContents(String text) |
addPropertyChangeListener, console_println, firePropertyChange, firePropertyChangeListener, getCreatedBy, getDescription, getFile, getFileResource, getId, getInfBoolean, getInfInt, getInfString, getInfValue, getManager, getName, getParent, getProperties, getProperty, getTypeName, getVersion, isSaved, loadInf, save, setCreatedBy, setDescription, setId, setName, setParent, setProperty, setSaved, setVersion, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
addPropertyChangeListener, getCreatedBy, getDescription, getFile, getId, getName, getParent, getProperties, getProperty, getTypeName, getVersion, isSaved, setCreatedBy, setDescription, setName, setProperty, setSaved, setVersion
public DefaultScriptingExternalFile(ScriptingFolder parent, ScriptingManager manager, String id)
public void load(ScriptingFolder folder, String id)
load
in interface Unit
load
in class AbstractUnit
public boolean rename(String newId)
ScriptingUnit
rename
in interface ScriptingUnit
newId
- String that contains the new Id.public void create(ScriptingFolder folder, String id)
create
in class AbstractUnit
public void create(ScriptingFolder folder, String id, String language)
public boolean remove()
remove
in interface ScriptingUnit
public boolean move(ScriptingFolder target)
ScriptingUnit
move
in interface ScriptingUnit
target
- ScriptingFolder
that represents the destination..public String[] getIconNames()
ScriptingUnit
getIconNames
in interface ScriptingUnit
public File getExternalFile()
getExternalFile
in interface ScriptingExternalFile
public List<File> getFiles()
ScriptingUnit
getFiles
in interface ScriptingUnit
public String getMimeType()
getMimeType
in interface ScriptingExternalFile
public void setContents(String text)
setContents
in interface ScriptingExternalFile
public String getContentsAsText()
getContentsAsText
in interface ScriptingExternalFile