generated from finos/software-project-blueprint
-
Notifications
You must be signed in to change notification settings - Fork 237
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Up To Latest Pure With Essential Functions * Add Relation Functions * Move functions module to Engine * Organize Function modules * Start moving aggregator functions * Fix Variance and StdDev * Fix Report * Rebase * Fix POM * Fix POM * Clean POMs * delete empty file * Rebase fixes * Fix post rebase * Fix print getAll type * Improve PCT report * rebase * Set Pure Prod Version * Ensure TZ is GMT for PCT
- Loading branch information
1 parent
679eede
commit 02966e7
Showing
855 changed files
with
33,670 additions
and
3,572 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
java -jar ~/.m2/repository/com/h2database/h2/1.4.200/h2-1.4.200.jar |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
63 changes: 63 additions & 0 deletions
63
...-engine-server-http-server/src/main/java/org/finos/legend/engine/server/core/pct/PCT.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
// Copyright 2020 Goldman Sachs | ||
// | ||
// 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. | ||
|
||
package org.finos.legend.engine.server.core.pct; | ||
|
||
import com.fasterxml.jackson.core.JsonProcessingException; | ||
import com.fasterxml.jackson.databind.ObjectMapper; | ||
import io.swagger.annotations.Api; | ||
import io.swagger.annotations.ApiOperation; | ||
import io.swagger.annotations.ApiParam; | ||
import org.finos.legend.pure.m3.pct.aggregate.generation.DocumentationGeneration; | ||
import org.finos.legend.pure.m3.pct.aggregate.model.Documentation; | ||
import org.pac4j.core.profile.CommonProfile; | ||
import org.pac4j.core.profile.ProfileManager; | ||
import org.pac4j.jax.rs.annotations.Pac4JProfileManager; | ||
|
||
import javax.ws.rs.GET; | ||
import javax.ws.rs.Path; | ||
import javax.ws.rs.Produces; | ||
import javax.ws.rs.core.MediaType; | ||
import javax.ws.rs.core.Response; | ||
|
||
@Api(tags = "PCT") | ||
@Path("pct") | ||
public class PCT | ||
{ | ||
@GET | ||
@Path("html") | ||
@ApiOperation(value = "PCT report in HTML") | ||
@Produces(MediaType.TEXT_HTML) | ||
public Response htmlPCT(@Pac4JProfileManager @ApiParam(hidden = true) ProfileManager<CommonProfile> pm) | ||
{ | ||
return Response.status(200).type(MediaType.TEXT_HTML).entity(PCT_to_SimpleHTML.buildHTML()).build(); | ||
} | ||
|
||
@GET | ||
@Path("json") | ||
@ApiOperation(value = "PCT report in JSON") | ||
@Produces(MediaType.APPLICATION_JSON) | ||
public Response jsonPCT(@Pac4JProfileManager @ApiParam(hidden = true) ProfileManager<CommonProfile> pm) | ||
{ | ||
try | ||
{ | ||
Documentation doc = DocumentationGeneration.buildDocumentation(); | ||
return Response.status(200).type(MediaType.APPLICATION_JSON).entity(new ObjectMapper().writeValueAsString(doc)).build(); | ||
} | ||
catch (JsonProcessingException e) | ||
{ | ||
throw new RuntimeException(e); | ||
} | ||
} | ||
} |
Oops, something went wrong.