use of com.servoy.j2db.plugins.IClientPlugin in project servoy-client by Servoy.
the class JSApplication method js_writeTXTFile.
/**
* @deprecated As of release 2.x, replaced by {@link plugins.file#writeTXTFile(Object[])}.
*/
@Deprecated
public boolean js_writeTXTFile(Object[] args) {
// $NON-NLS-1$
IClientPlugin cp = application.getPluginManager().getPlugin(IClientPlugin.class, "file");
if (cp != null) {
IScriptable so = cp.getScriptObject();
if (so != null) {
try {
// $NON-NLS-1$
Method m = so.getClass().getMethod("js_writeTXTFile", getClassArrayFromObjectArgs(args));
Boolean obj = (Boolean) m.invoke(so, args);
if (obj != null)
return obj.booleanValue();
return false;
} catch (Exception e) {
Debug.error(e);
}
}
}
application.reportError("Writing to text file failed", "For this operation the file plugin is needed\nNote this method is deprecated, use the plugin directly in your code");
return false;
}
use of com.servoy.j2db.plugins.IClientPlugin in project servoy-client by Servoy.
the class JSApplication method js_sendMail.
/**
* @deprecated As of release 2.x, replaced by {@link plugins.mail#sendMail(Object[])}.
*/
@Deprecated
public boolean js_sendMail(Object[] args) {
// $NON-NLS-1$
IClientPlugin cp = application.getPluginManager().getPlugin(IClientPlugin.class, "mail");
if (cp != null) {
IScriptable so = cp.getScriptObject();
if (so != null) {
try {
// $NON-NLS-1$
Method m = so.getClass().getMethod("js_sendMail", getClassArrayFromObjectArgs(args));
Boolean b = (Boolean) m.invoke(so, args);
return b.booleanValue();
} catch (Exception e) {
Debug.error(e);
}
}
}
application.reportError("Send mail failed", "For sending mail the mail plugin is needed\nNote this method is deprecated, use the plugin directly in your code");
return false;
}
use of com.servoy.j2db.plugins.IClientPlugin in project servoy-client by Servoy.
the class JSApplication method js_showFileSaveDialog.
/**
* @deprecated As of release 2.x, replaced by {@link plugins.file#showFileSaveDialog(Object[])}.
*/
@Deprecated
public String js_showFileSaveDialog(Object[] args) {
// $NON-NLS-1$
IClientPlugin cp = application.getPluginManager().getPlugin(IClientPlugin.class, "file");
if (cp != null) {
IScriptable so = cp.getScriptObject();
if (so != null) {
try {
// $NON-NLS-1$
Method m = so.getClass().getMethod("js_showFileSaveDialog", getClassArrayFromObjectArgs(args));
Object obj = m.invoke(so, args);
if (obj != null)
return obj.toString();
return null;
} catch (Exception e) {
Debug.error(e);
}
}
}
application.reportError("Showing file save dialog failed", "For this operation the file plugin is needed\nNote this method is deprecated, use the plugin directly in your code");
return null;
}
use of com.servoy.j2db.plugins.IClientPlugin in project servoy-client by Servoy.
the class JSApplication method js_createTempFile.
/**
* @deprecated As of release 2.x, replaced by {@link plugins.file#createTempFile(String, String)}.
*/
@Deprecated
public Object js_createTempFile(String prefix, String suffix) {
// $NON-NLS-1$
IClientPlugin cp = application.getPluginManager().getPlugin(IClientPlugin.class, "file");
if (cp != null) {
IScriptable so = cp.getScriptObject();
if (so != null) {
try {
// $NON-NLS-1$
Method m = so.getClass().getMethod("js_createTempFile", new Class[] { String.class, String.class });
Object obj = m.invoke(so, new Object[] { prefix, suffix });
if (obj != null)
return obj.toString();
return null;
} catch (Exception e) {
Debug.error(e);
}
}
}
application.reportError("Create temp file failed", "For this operation the file plugin is needed\nNote this method is deprecated, use the plugin directly in your code");
return null;
}
use of com.servoy.j2db.plugins.IClientPlugin in project servoy-client by Servoy.
the class JSApplication method js_showDirectorySelectDialog.
/**
* @deprecated As of release 2.x, replaced by {@link plugins.file#showDirectorySelectDialog(Object[])}.
*/
@Deprecated
public String js_showDirectorySelectDialog(Object[] args) {
// $NON-NLS-1$
IClientPlugin cp = application.getPluginManager().getPlugin(IClientPlugin.class, "file");
if (cp != null) {
IScriptable so = cp.getScriptObject();
if (so != null) {
try {
// $NON-NLS-1$
Method m = so.getClass().getMethod("js_showDirectorySelectDialog", getClassArrayFromObjectArgs(args));
Object obj = m.invoke(so, args);
if (obj != null)
return obj.toString();
return null;
} catch (Exception e) {
Debug.error(e);
}
}
}
application.reportError("Showing directory select dialog failed", "For this operation the file plugin is needed\nNote this method is deprecated, use the plugin directly in your code");
return null;
}
Aggregations