beanPath += field + "]"; info.put("url", new Reference(baseRef, "../beans/" + TextUtils.urlEscape(beanPath)).getTargetRef()); info.put("url", new Reference(baseRef, "../beans/" + key).getTargetRef()); return info;
bean.put("url", new Reference(baseRef, "../beans/" + getBeanToNameMap().get(obj)).getTargetRef()); bean.put("class", obj.getClass().getName());
/** * Constructs a nested Map data structure with the information represented * by this Resource. The result is particularly suitable for use with with * {@link XmlMarshaller}. * * @return the nested Map data structure */ protected ScriptModel makeDataModel() { String baseRef = getRequest().getResourceRef().getBaseRef().toString(); if(!baseRef.endsWith("/")) { baseRef += "/"; } Reference baseRefRef = new Reference(baseRef); ScriptModel model = new ScriptModel(scriptingConsole, new Reference(baseRefRef, "..").getTargetRef().toString(), getAvailableScriptEngines()); return model; }
new Reference(getRequest().getResourceRef().getBaseRef(), "..").getTargetRef().toString(), beanPath, bean,
/** * Returns true if both reference are equivalent, meaning that they resolve * to the same target reference. * * @param ref * The reference to compare. * @return True if both reference are equivalent. */ public boolean isEquivalentTo(Reference ref) { return getTargetRef().equals(ref.getTargetRef()); }
/** * Returns true if both reference are equivalent, meaning that they resolve * to the same target reference. * * @param ref * The reference to compare. * @return True if both reference are equivalent. */ public boolean isEquivalentTo(Reference ref) { return getTargetRef().equals(ref.getTargetRef()); }
/** * Returns true if both reference are equivalent, meaning that they resolve * to the same target reference. * * @param ref * The reference to compare. * @return True if both reference are equivalent. */ public boolean isEquivalentTo(Reference ref) { return getTargetRef().equals(ref.getTargetRef()); }
/** * Converts to a {@link java.net.URI} instance. Note that relative * references are resolved before conversion using the * {@link #getTargetRef()} method. * * @return A {@link java.net.URI} instance. */ public java.net.URI toUri() { return java.net.URI.create(getTargetRef().toString()); }
/** * Converts to a {@link java.net.URI} instance. Note that relative * references are resolved before conversion using the {@link #getTargetRef()} method. * * @return A {@link java.net.URI} instance. */ public java.net.URI toUri() { return java.net.URI.create(getTargetRef().toString()); }
/** * Constructor. * * @param localRef * The local reference. */ public LocalReference(Reference localRef) { super(localRef.getTargetRef().toString()); }
protected Reference createReference( Reference base, String relPart ) { Reference ref = new Reference( base, relPart ); return updateBaseRefPath( ref ).getTargetRef(); }
public UserREST getUser() throws NotSuccessException { if (user == null) { // Find current user through redirect // TODO: Support data directly at currentUserURI? Response response = head(getCurrentUserURI()); user = new UserREST(this, response.getRedirectRef().getTargetRef()); } return user; }
protected Reference createRootReference(Request request, String relPart) { Reference ref = new Reference(getContextRoot(request), relPart); if (!ref.getBaseRef().getPath().endsWith("/")) { ref.getBaseRef().setPath(ref.getBaseRef().getPath() + "/"); } return ref.getTargetRef(); }
public MailRepresentation retrieve() { MailRepresentation mail = new MailRepresentation(); mail.setStatus("received"); mail.setSubject("Message to self"); mail.setContent("Doh!"); mail.setAccountRef(new Reference(getReference(), "..").getTargetRef() .toString()); return mail; }
public Mail retrieve() { Mail mail = new Mail(); mail.setStatus("received"); mail.setSubject("Message to self"); mail.setContent("Doh!"); mail.setAccountRef(new Reference(getReference(), "..").getTargetRef() .toString()); return mail; }
public Mail retrieve() { Mail mail = new Mail(); mail.setStatus("received"); mail.setSubject("Message to self"); mail.setContent("Doh!"); mail.setAccountRef(new Reference(getReference(), "..").getTargetRef() .toString()); return mail; }
public MailRepresentation retrieve() { MailRepresentation mail = new MailRepresentation(); mail.setStatus("received"); mail.setSubject("Message to self"); mail.setContent("Doh!"); mail.setAccountRef(new Reference(getReference(), "..").getTargetRef() .toString()); return mail; }
public Mail retrieve() { Mail mail = new Mail(); mail.setStatus("received"); mail.setSubject("Message to self"); mail.setContent("Doh!"); mail.setAccountRef(new Reference(getReference(), "..").getTargetRef() .toString()); return mail; }
public Mail retrieve() { Mail mail = new Mail(); mail.setStatus("received"); mail.setSubject("Message to self"); mail.setContent("Doh!"); mail.setAccountRef(new Reference(getReference(), "..").getTargetRef() .toString()); return mail; }
@Get public Representation toJson() { // Create the mail bean Mail mail = new Mail(); mail.setStatus("received"); mail.setSubject("Message to self"); mail.setContent("Doh!"); mail.setAccountRef(new Reference(getReference(), "..").getTargetRef() .toString()); // Wraps the bean with a Jackson representation return new JacksonRepresentation<Mail>(mail); }