
net.officefloor.woof.WoOF Maven / Gradle / Ivy
/*-
* #%L
* Web on OfficeFloor
* %%
* Copyright (C) 2005 - 2020 Daniel Sagenschneider
* %%
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see .
* #L%
*/
package net.officefloor.woof;
import net.officefloor.OfficeFloorMain;
import net.officefloor.compile.properties.Property;
import net.officefloor.frame.api.manage.OfficeFloor;
import net.officefloor.server.http.HttpServerLocation;
/**
*
* Provides main
method for running Web on OfficeFloor (WoOF)
* application.
*
* It also provides useful methods for testing the WoOF server.
*
* @author Daniel Sagenschneider
*/
public class WoOF extends OfficeFloorMain {
/**
* {@link System} {@link Property} name to configure list of profiles for
* {@link WoOF}.
*/
public static final String DEFAULT_OFFICE_PROFILES = "application.profiles";
/**
* Opens the WoOF application on the ports.
*
* @param httpPort HTTP port.
* @param httpsPort HTTPS port.
* @return {@link OfficeFloor} to the WoOF application.
*/
public static OfficeFloor open(int httpPort, int httpsPort) {
return OfficeFloorMain.open(HttpServerLocation.PROPERTY_HTTP_PORT, String.valueOf(httpPort),
HttpServerLocation.PROPERTY_HTTP_PORT, String.valueOf(httpsPort));
}
}