@Override public RouteOptions roles(String... roles) { Coll.assign(this.roles, roles); return this; }
public RenderCtxImpl multiModel(List<Object> model) { Coll.assign(this.model, model); return this; }
public HttpReq cookies(Map<String, String> cookies) { Coll.assign(this.cookies, cookies); return this; }
public HttpReq data(Map<String, ?> data) { Coll.assign(this.data, data); return this; }
public HttpReq headers(Map<String, String> headers) { Coll.assign(this.headers, headers); return this; }
public HttpReq files(Map<String, List<Upload>> files) { Coll.assign(this.files, files); return this; }
public HttpClient cookies(Map<String, String> cookies) { Coll.assign(this.cookies, cookies); return this; }
@Override public Screen menu(Map<String, ?> menu) { Coll.assign(this.menu, U.cast(menu)); return this; }
public static ConfigChanges from(List<String> keys, Map<String, Object> old, Map<String, Object> fresh, boolean initial) { ConfigChanges changes = new ConfigChanges(initial); Coll.assign(changes.keys, keys); for (Map.Entry<String, Object> e : old.entrySet()) { String key = e.getKey(); Object oldValue = e.getValue(); Object newValue = fresh.get(key); if (!isEmptyValue(oldValue)) { if (!isEmptyValue(newValue)) { if (U.neq(oldValue, newValue)) { changes.changed.put(key, newValue); } } else { changes.removed.add(key); } } } for (Map.Entry<String, Object> e : fresh.entrySet()) { String key = e.getKey(); Object oldValue = old.get(key); Object newValue = fresh.get(key); if (!isEmptyValue(newValue)) { if (isEmptyValue(oldValue)) { changes.added.put(key, newValue); } } } return changes; }
public RouteOptions copy() { RouteOptions copy = new RouteOptions(); copy.contentType = this.contentType; copy.view = this.view; copy.mvc = this.mvc; copy.transaction = this.transaction; Coll.assign(copy.roles, this.roles); copy.wrappers = U.array(this.wrappers); copy.zone = this.zone; copy.managed = this.managed; copy.cacheTTL = this.cacheTTL; copy.cacheCapacity = this.cacheCapacity; copy.internal = this.internal; copy.meta = this.meta.copy(); return copy; }
public static Ctx open(WithContext context) { Ctx ctx = Ctxs.open(context.tag()); ctx.setExchange(context.exchange()); ctx.setPersister(context.persister()); ctx.setUser(context.user()); Coll.assign(ctx.extras(), U.safe(context.extras())); return ctx; }
@Override public void assign(Screen src) { home(src.home()); brand(src.brand()); title(src.title()); content(src.content()); menu(Coll.deepCopyOf(src.menu())); embedded(src.embedded()); search(src.search()); navbar(src.navbar()); fluid(src.fluid()); cdn(src.cdn()); Coll.assign(js, src.js()); Coll.assign(css, src.css()); }
@Override public RouteOptions roles(String... roles) { Coll.assign(this.roles, roles); return this; }
public RenderCtxImpl multiModel(List<Object> model) { Coll.assign(this.model, model); return this; }
public RouteOptions copy() { RouteOptions copy = new RouteOptions(); copy.contentType = this.contentType; copy.view = this.view; copy.mvc = this.mvc; copy.transaction = this.transaction; Coll.assign(copy.roles, this.roles); copy.wrappers = U.array(this.wrappers); copy.zone = this.zone; copy.managed = this.managed; copy.cacheTTL = this.cacheTTL; copy.cacheCapacity = this.cacheCapacity; return copy; }