"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "openmeetings-webservice/src/main/java/org/apache/openmeetings/webservice/InfoWebService.java" between
apache-openmeetings-6.1.0-src.tar.gz and apache-openmeetings-6.2.0-src.tar.gz

About: OpenMeetings is a browser-based software that allows you to set up instantly a conference in the Web. You can use your microphone or webcam, share documents on a white board, share your screen or record meetings. Source code.

InfoWebService.java  (apache-openmeetings-6.1.0-src):InfoWebService.java  (apache-openmeetings-6.2.0-src)
skipping to change at line 23 skipping to change at line 23
* software distributed under the License is distributed on an * software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the * KIND, either express or implied. See the License for the
* specific language governing permissions and limitations * specific language governing permissions and limitations
* under the License. * under the License.
*/ */
package org.apache.openmeetings.webservice; package org.apache.openmeetings.webservice;
import static org.apache.openmeetings.webservice.Constants.TNS; import static org.apache.openmeetings.webservice.Constants.TNS;
import java.net.URI;
import javax.jws.WebMethod; import javax.jws.WebMethod;
import javax.jws.WebService; import javax.jws.WebService;
import javax.ws.rs.GET; import javax.ws.rs.GET;
import javax.ws.rs.Path; import javax.ws.rs.Path;
import javax.ws.rs.Produces; import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType; import javax.ws.rs.core.MediaType;
import org.apache.cxf.feature.Features; import org.apache.cxf.feature.Features;
import org.apache.openmeetings.db.dto.basic.Health; import org.apache.openmeetings.db.dto.basic.Health;
import org.apache.openmeetings.db.dto.basic.Info; import org.apache.openmeetings.db.dto.basic.Info;
import org.apache.openmeetings.util.OpenmeetingsVariables;
import org.apache.openmeetings.util.Version;
import org.apache.openmeetings.webservice.schema.HealthWrapper;
import org.apache.openmeetings.webservice.schema.InfoWrapper;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import com.github.openjson.JSONArray;
import com.github.openjson.JSONObject;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.media.Content;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.responses.ApiResponse;
import io.swagger.v3.oas.annotations.tags.Tag;
/** /**
* *
* The Service contains methods to get info about the system * The Service contains methods to get info about the system and manifest
* *
* @author solomax * @author solomax, sebawagner
* *
*/ */
@Service("infoWebService") @Service("infoWebService")
@WebService(serviceName="org.apache.openmeetings.webservice.InfoWebService", tar getNamespace = TNS) @WebService(serviceName="org.apache.openmeetings.webservice.InfoWebService", tar getNamespace = TNS)
@Features(features = "org.apache.cxf.ext.logging.LoggingFeature") @Features(features = "org.apache.cxf.ext.logging.LoggingFeature")
@Produces({MediaType.APPLICATION_JSON}) @Produces({MediaType.APPLICATION_JSON})
@Tag(name = "InfoService")
@Path("/info") @Path("/info")
public class InfoWebService { public class InfoWebService {
/** /**
* Method to get current OpenMeetings version * Method to get current OpenMeetings version
* *
* @return - version * @return - version
*/ */
@WebMethod @WebMethod
@GET @GET
@Path("/version") @Path("/version")
@Operation(
description = "Method to get current OpenMeetings version
",
responses = {
@ApiResponse(responseCode = "200", descri
ption = "Current version", content = @Content(schema = @Schema(implementation =
InfoWrapper.class))),
@ApiResponse(responseCode = "500", descri
ption = "Error in case of server error")
}
)
public Info getVersion() { public Info getVersion() {
return new Info(); return new Info();
} }
/** /**
* Method to get health report for this OpenMeetings instance * Method to get health report for this OpenMeetings instance
* *
* @return - health report * @return - health report
*/ */
@WebMethod @WebMethod
@GET @GET
@Path("/health") @Path("/health")
@Operation(
description = "Method to get health report for this OpenM
eetings instance",
responses = {
@ApiResponse(responseCode = "200", descri
ption = "health report", content = @Content(schema = @Schema(implementation = He
althWrapper.class))),
@ApiResponse(responseCode = "500", descri
ption = "Error in case of server error")
}
)
public Health getHealth() { public Health getHealth() {
return Health.INSTANCE; return Health.INSTANCE;
} }
@WebMethod
@GET
@Path("/manifest.webmanifest")
@Produces({"application/manifest+json"})
public String getManifest() {
URI omPath = OpenmeetingsVariables.getWebappPath();
JSONObject manifest = new JSONObject();
manifest.put("name", OpenmeetingsVariables.getApplicationName() +
" " + Version.getVersion());
manifest.put("short_name", OpenmeetingsVariables.getApplicationNa
me() + " " + Version.getVersion());
manifest.put("description", "Openmeetings provides video conferen
cing, instant messaging, white board, collaborative document editing and other g
roupware tools.");
manifest.put("start_url", omPath.resolve("?pwa=true"));
manifest.put("scope", "/");
manifest.put("background_color", "#ffffff");
manifest.put("theme_color", "#ffffff");
manifest.put("dir", "auto");
manifest.put("display", "standalone");
manifest.put("orientation", "landscape");
JSONArray icons = new JSONArray();
icons.put(generateIcon("manifest-icon-512.maskable.png", "512x512
", "maskable", omPath));
icons.put(generateIcon("manifest-icon-192.maskable.png", "192x192
", "maskable", omPath));
manifest.put("icons", icons);
manifest.put("prefer_related_applications", "false");
return manifest.toString(2);
}
private JSONObject generateIcon(String name, String dimension, String pur
pose, URI omPath) {
JSONObject icon = new JSONObject();
icon.put("src", omPath.resolve("images/icons/" + name));
icon.put("type", "image/png");
icon.put("sizes", dimension);
icon.put("purpose", purpose);
return icon;
}
} }
 End of changes. 9 change blocks. 
2 lines changed or deleted 82 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)