use of lucee.runtime.exp.PageException in project Lucee by lucee.
the class QueryImpl method readExternal.
public void readExternal(ObjectInput in) throws IOException {
try {
QueryImpl other = (QueryImpl) new CFMLExpressionInterpreter(false).interpret(ThreadLocalPageContext.get(), in.readUTF());
this.arrCurrentRow = other.arrCurrentRow;
this.columncount = other.columncount;
this.columnNames = other.columnNames;
this.columns = other.columns;
this.exeTime = other.exeTime;
this.generatedKeys = other.generatedKeys;
this.cacheType = other.cacheType;
this.name = other.name;
this.recordcount = other.recordcount;
this.sql = other.sql;
this.updateCount = other.updateCount;
} catch (PageException e) {
throw new IOException(e.getMessage());
}
}
use of lucee.runtime.exp.PageException in project Lucee by lucee.
the class XMLConfigAdmin method updateClusterClass.
public void updateClusterClass(ClassDefinition cd) throws PageException {
if (cd.getClassName() == null)
cd = new ClassDefinitionImpl(ClusterNotSupported.class.getName(), null, null, null);
Class clazz = null;
try {
clazz = cd.getClazz();
} catch (Exception e) {
throw Caster.toPageException(e);
}
if (!Reflector.isInstaneOf(clazz, Cluster.class) && !Reflector.isInstaneOf(clazz, ClusterRemote.class))
throw new ApplicationException("class [" + clazz.getName() + "] does not implement interface [" + Cluster.class.getName() + "] or [" + ClusterRemote.class.getName() + "]");
Element scope = _getRootElement("scope");
setClass(scope, null, "cluster-", cd);
ScopeContext.clearClusterScope();
}
use of lucee.runtime.exp.PageException in project Lucee by lucee.
the class XMLConfigAdmin method restart.
/*private Resource getPatchDirectory(CFMLEngine engine) throws IOException {
//File f=engine.getCFMLEngineFactory().getResourceRoot();
Resource res = ResourcesImpl.getFileResourceProvider().getResource(engine.getCFMLEngineFactory().getResourceRoot().getAbsolutePath());
Resource pd = res.getRealResource("patches");
if(!pd.exists())pd.mkdirs();
return pd;
}*/
/**
* run update from cfml engine
* @throws PageException
*/
public void restart(Password password) throws PageException {
checkWriteAccess();
ConfigServerImpl cs = (ConfigServerImpl) ConfigImpl.getConfigServer(config, password);
CFMLEngineFactory factory = cs.getCFMLEngine().getCFMLEngineFactory();
synchronized (factory) {
try {
cleanUp(factory);
factory.restart(cs.getPassword());
} catch (Exception e) {
throw Caster.toPageException(e);
}
}
}
use of lucee.runtime.exp.PageException in project Lucee by lucee.
the class XMLConfigAdmin method _hasRHExtensions.
private RHExtension _hasRHExtensions(ConfigImpl config, ExtensionDefintion ed) throws PageException {
Element extensions = _getRootElement("extensions");
// LuceeHandledExtensions
Element[] children = XMLConfigWebFactory.getChildren(extensions, "rhextension");
RHExtension tmp;
try {
for (int i = 0; i < children.length; i++) {
tmp = new RHExtension(config, children[i]);
if (tmp != null && ed.equals(tmp))
return tmp;
}
return null;
} catch (Exception e) {
throw Caster.toPageException(e);
}
}
use of lucee.runtime.exp.PageException in project Lucee by lucee.
the class XMLConfigWebFactory method toStruct.
private static Struct toStruct(String str) {
Struct sct = new StructImpl();
try {
String[] arr = ListUtil.toStringArray(ListUtil.listToArrayRemoveEmpty(str, '&'));
String[] item;
for (int i = 0; i < arr.length; i++) {
item = ListUtil.toStringArray(ListUtil.listToArrayRemoveEmpty(arr[i], '='));
if (item.length == 2)
sct.setEL(KeyImpl.init(URLDecoder.decode(item[0], true).trim()), URLDecoder.decode(item[1], true));
else if (item.length == 1)
sct.setEL(KeyImpl.init(URLDecoder.decode(item[0], true).trim()), "");
}
} catch (PageException ee) {
}
return sct;
}
Aggregations