{
this.provider = provider;
this.name = name;
this.parent = parent;
ScriptMetaData data = null;
XSimpleFileAccess xSFA = null;
XComponentContext xCtx = provider.getScriptingContext().getComponentContext();
XMultiComponentFactory xFac = xCtx.getServiceManager();
try
{
data = (ScriptMetaData)parent.getByName( name );
xSFA = ( XSimpleFileAccess)
UnoRuntime.queryInterface( XSimpleFileAccess.class,
xFac.createInstanceWithContext(
"com.sun.star.ucb.SimpleFileAccess",
xCtx ) );
}
// TODO fix exception types to be caught here, should we rethrow?
catch ( Exception e )
{
LogUtils.DEBUG("** caught exception getting script data for " + name + " ->" + e.toString() );
}
uri = data.getShortFormScriptURL();
description = data.getDescription();
if (provider.hasScriptEditor() == true)
{
this.editable = true;
try
{
if ( !parent.isUnoPkg() &&
!xSFA.isReadOnly( parent.getPathToParcel() ) )
{
this.deletable = true;
this.renamable = true;
}
}