package org.gcube.smartgears.configuration.application; import java.util.Set; import org.gcube.smartgears.configuration.ProxyAddress; import org.gcube.smartgears.persistence.PersistenceWriter; /** * The configuration of the application. * * @author Fabio Simeoni * */ public interface ApplicationConfiguration { /** * Returns the context path of the application * @return the context path */ String context(); boolean proxable(); ProxyAddress proxyAddress(); ApplicationConfiguration proxyAddress(ProxyAddress proxy); /** * Sets the context path of the application * @param context the context path * @return this configuration */ ApplicationConfiguration context(String context); /** * Returns the name of the application. * @return the name */ String name(); /** * Sets the name of the application. * @param name the name * @return this configuration */ ApplicationConfiguration name(String name); /** * Returns the class of the application * @return the class */ String serviceClass(); /** * Sets the class of the application. * @param serviceClass the class * @return this configuration */ ApplicationConfiguration serviceClass(String serviceClass); /** * Returns the version of the application. * @return the version */ String version(); /** * Sets the version of the application. * @param version the version * @return this configuration */ ApplicationConfiguration version(String version); /** * Returns the description of the application. * @return the description */ String description(); /** * Sets the description of the application. * @param description the description * @return this configuration */ ApplicationConfiguration description(String description); /** * Returns the persistence manager of the application. * @return the manager */ PersistenceWriter persistence(); /** * Returns a set of request paths that should not be subjected to request management. * @return the set of exclude paths. */ Set excludes(); /** * Returns a set of request paths that should be subjected to request management. * @return the set of exclude paths. */ Set includes(); /** * Sets the persistence manager of the application. * @param manager the manager * @return this configuration */ ApplicationConfiguration persistence(PersistenceWriter manager); /** * Validates this configuration. * * @throws IllegalStateException if the configuration is not valid */ void validate(); /** * Merges this configuration with another configuration * @param config the other configuration */ void merge(ApplicationConfiguration config); ApplicationConfiguration excludes(Exclude ... excludes); ApplicationConfiguration includes(Include ... includes); }