org.rapidoid.web.Screen Maven / Gradle / Ivy
/*-
* #%L
* rapidoid-commons
* %%
* Copyright (C) 2014 - 2018 Nikolche Mihajlovski and contributors
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* #L%
*/
package org.rapidoid.web;
import org.rapidoid.annotation.Authors;
import org.rapidoid.annotation.Since;
import java.io.OutputStream;
import java.util.Map;
import java.util.Set;
/**
* GUI Screen (HTML Page) API.
* Provides a convenient access to some common GUI screen attributes of the underlying MVC model: Resp#model()
.
*/
@Authors("Nikolche Mihajlovski")
@Since("5.1.0")
public interface Screen {
/**
* Renders the screen.
*/
String render();
/**
* Renders the screen to the specified OutputStream.
*/
void render(OutputStream out);
/**
* Sets the "title" attribute in the MVC model of the response, used for GUI page rendering.
*/
Screen title(String title);
/**
* Gets the "title" attribute from the MVC model of the response, used for GUI page rendering.
*/
String title();
/**
* Sets the "brand" attribute in the MVC model of the response, used for GUI page rendering.
*/
Screen brand(Object brand);
/**
* Gets the "brand" attribute from the MVC model of the response, used for GUI page rendering.
*/
Object brand();
/**
* Sets the "content" attribute in the MVC model of the response, used for GUI page rendering.
*/
Object[] content();
/**
* Sets the "content" attribute in the MVC model of the response, used for GUI page rendering.
*/
Screen content(Object... content);
/**
* Sets the "menu" attribute in the MVC model of the response, used for GUI page rendering.
*/
Screen menu(Map menu);
/**
* Gets the "menu" attribute from the MVC model of the response, used for GUI page rendering.
*/
Map menu();
/**
* Sets the "search" attribute in the MVC model of the response, used for GUI page rendering.
*/
Screen search(boolean search);
/**
* Gets the "search" attribute from the MVC model of the response, used for GUI page rendering.
*/
boolean search();
/**
* Sets the "embedded" attribute in the MVC model of the response, used for GUI page rendering.
*/
boolean embedded();
/**
* Sets the "embedded" attribute in the MVC model of the response, used for GUI page rendering.
*/
Screen embedded(boolean embedded);
/**
* Sets the "cdn" attribute in the MVC model of the response, used for GUI page rendering.
*/
Screen cdn(boolean cdn);
/**
* Gets the "cdn" attribute from the MVC model of the response, used for GUI page rendering.
*/
boolean cdn();
/**
* Sets the "navbar" attribute in the MVC model of the response, used for GUI page rendering.
*/
Screen navbar(boolean navbar);
/**
* Gets the "navbar" attribute from the MVC model of the response, used for GUI page rendering.
*/
boolean navbar();
/**
* Sets the "fluid" attribute in the MVC model of the response, used for GUI page rendering.
*/
Screen fluid(boolean fluid);
/**
* Gets the "fluid" attribute from the MVC model of the response, used for GUI page rendering.
*/
boolean fluid();
/**
* Sets the "home" attribute in the MVC model of the response, used for GUI page rendering.
*/
Screen home(String home);
/**
* Gets the "home" attribute from the MVC model of the response, used for GUI page rendering.
*/
String home();
/**
* Retrieves a modifiable set of JavaScript asset URIs, used for GUI page rendering.
*/
Set js();
/**
* Retrieves a modifiable set of CSS asset URIs, used for GUI page rendering.
*/
Set css();
}