use of lucee.runtime.type.StructImpl in project Lucee by lucee.
the class ConfigImpl method listCTCache.
public Struct listCTCache() {
Struct sct = new StructImpl();
if (ctPatchCache == null)
return sct;
Iterator<Entry<String, InitFile>> it = ctPatchCache.entrySet().iterator();
Entry<String, InitFile> entry;
while (it.hasNext()) {
entry = it.next();
sct.setEL(entry.getKey(), entry.getValue().getPageSource().getDisplayPath());
}
return sct;
}
use of lucee.runtime.type.StructImpl in project Lucee by lucee.
the class RemoteClientImpl method getId.
@Override
public String getId(Config config) {
if (id != null)
return id;
Struct attrColl = new StructImpl();
attrColl.setEL(KeyConstants._action, "getToken");
Struct args = new StructImpl();
args.setEL(KeyConstants._type, getType());
args.setEL(RemoteClientTask.PASSWORD, getAdminPasswordEncrypted());
args.setEL(RemoteClientTask.CALLER_ID, "undefined");
args.setEL(RemoteClientTask.ATTRIBUTE_COLLECTION, attrColl);
try {
WSClient rpc = WSClient.getInstance(null, getUrl(), getServerUsername(), getServerPassword(), getProxyData());
Object result = rpc.callWithNamedValues(config, KeyConstants._invoke, args);
return id = IdentificationImpl.createId(securityKey, Caster.toString(result, null), false, null);
} catch (Throwable t) {
ExceptionUtil.rethrowIfNecessary(t);
return null;
}
}
use of lucee.runtime.type.StructImpl in project Lucee by lucee.
the class ReferenceReference method touch.
@Override
public Object touch(PageContext pc) throws PageException {
Object parent = reference.touch(pc);
Object o = pc.getCollection(parent, key, null);
if (o != null)
return o;
return pc.set(parent, key, new StructImpl());
}
use of lucee.runtime.type.StructImpl in project Lucee by lucee.
the class VariableReference method touchEL.
@Override
public Object touchEL(PageContext pc) {
Object o;
if (coll instanceof Query) {
o = ((Query) coll).getColumn(key, null);
if (o != null)
return o;
return setEL(pc, new StructImpl());
}
o = coll.get(key, null);
if (o != null)
return o;
return setEL(pc, new StructImpl());
}
use of lucee.runtime.type.StructImpl in project Lucee by lucee.
the class ArgumentImpl method toStruct.
/*
public void setNamedArguments(boolean namedArguments) {
this.namedArguments=namedArguments;
}
public boolean isNamedArguments() {
return namedArguments;
}
*/
/**
* converts a argument scope to a regular struct
* @param arg argument scope to convert
* @return resulting struct
*/
public static Struct toStruct(Argument arg) {
Struct trg = new StructImpl();
StructImpl.copy(arg, trg, false);
return trg;
}
Aggregations