/** * Nothing to show, no talks. * @return JAX-RS response * @throws IOException If fails */ @GET @Path("/empty") public Response empty() throws IOException { this.human(); return new PageBuilder() .stylesheet("/xsl/empty.xsl") .build(EmptyPage.class) .init(this) .render() .build(); }
/** * Create new class. * @param base Parent class, which will be inherited * @return The instance of the class just created * @param <T> The type of result expected */ @NotNull public <T> T build(@NotNull final Class<T> base) { final T page; try { page = base.cast(this.createOrFind(base).newInstance()); } catch (final InstantiationException ex) { throw new IllegalStateException(ex); } catch (final IllegalAccessException ex) { throw new IllegalStateException(ex); } return page; }
final Class<?> cls; if (PageBuilder.POOL.getOrNull(name) == null) { cls = this.construct(name, base); } else { try {
.append(Stylesheet.class, this.xsl.toString()) .append(Schema.class, this.xsd); for (final Annotation existing : this.annotations(ctc, parent)) { attribute.addAnnotation(existing);
/** * Show errror, on GET. * @return The JAX-RS response */ @GET @Path("/") public Response get() { return new PageBuilder() .stylesheet("/xsl/error.xsl") .build(StPage.class) .init(this) .render() .status(HttpURLConnection.HTTP_NOT_FOUND) .build(); }
/** * Get entrance page JAX-RS response. * @return The JAX-RS response * @throws IOException If fails */ @GET @Path("/") public Response index() throws IOException { return new PageBuilder() .stylesheet("/xsl/index.xsl") .build(StPage.class) .init(this) .append(new JaxbBundle("menu", "home")) .append( new JaxbBundle( "documentation", IOUtils.toString( this.getClass().getResourceAsStream( "doc-index.html" ) ) ) ) .render() .build(); }
/** * Upload photo. * @return The JAX-RS response * @throws IOException If fails */ @GET @Path("/photo") public Response photo() throws IOException { new SafeHuman(this.human(), this); return new PageBuilder() .stylesheet("/xsl/photo.xsl") .build(EmptyPage.class) .init(this) .link( new Link( "upload", this.uriInfo().getBaseUriBuilder().clone() .path(ProfileRs.class) .path(ProfileRs.class, "upload") .build() ) ) .render() .build(); }
/** * Get entrance page JAX-RS response. * @return The JAX-RS response * @throws Exception If some problem inside */ @GET @Path("/") public Response index() throws Exception { return new PageBuilder() .stylesheet("/xsl/counters.xsl") .build(StPage.class) .init(this) .append( new JaxbBundle( "documentation", IOUtils.toString( this.getClass().getResourceAsStream( "doc-counters.html" ) ) ) ) .append(this.list()) .append(new JaxbBundle("menu", "counters")) .link(new Link("add", "./add")) .render() .build(); }
/** * Get entrance page JAX-RS response. * @return The JAX-RS response * @throws Exception If some problem inside */ @GET @Path("/") public Response index() throws Exception { return new PageBuilder() .stylesheet("/xsl/locks.xsl") .build(StPage.class) .init(this) .append( new JaxbBundle( "documentation", IOUtils.toString( this.getClass().getResourceAsStream( "doc-locks.html" ) ) ) ) .append(this.list()) .append(new JaxbBundle("menu", "locks")) .link(new Link("lock", "./lock")) .link(new Link("label", "./label")) .link(new Link("unlock", "./unlock")) .render() .build(); }
); return new PageBuilder() .stylesheet("/xsl/no-details.xsl") .build(EmptyPage.class) .init(this) .link(
); return new PageBuilder() .stylesheet("/xsl/index.xsl") .build(EmptyPage.class) .init(this) .link(new Link("enter", "./enter"))
Iterables.limit(this.human().history().iterate(), Tv.TWENTY) ); EmptyPage page = new PageBuilder() .stylesheet("/xsl/history.xsl") .build(EmptyPage.class) .init(this); if (!talks.isEmpty()) {
); return new PageBuilder() .stylesheet("/xsl/not-confirmed.xsl") .build(EmptyPage.class) .init(this) .link(
final Talk talk = this.talk(); final Role role = new Role(talk, this.human()); return new PageBuilder() .stylesheet("/xsl/talk.xsl") .build(EmptyPage.class) .init(this) .link(new Link("post", "./post"))