diff options
Diffstat (limited to 'winery/org.eclipse.winery.repository/src/main/java/org/eclipse/winery/repository/resources/entitytypes/policytypes/LanguageResource.java')
-rw-r--r-- | winery/org.eclipse.winery.repository/src/main/java/org/eclipse/winery/repository/resources/entitytypes/policytypes/LanguageResource.java | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/winery/org.eclipse.winery.repository/src/main/java/org/eclipse/winery/repository/resources/entitytypes/policytypes/LanguageResource.java b/winery/org.eclipse.winery.repository/src/main/java/org/eclipse/winery/repository/resources/entitytypes/policytypes/LanguageResource.java new file mode 100644 index 0000000..036cc73 --- /dev/null +++ b/winery/org.eclipse.winery.repository/src/main/java/org/eclipse/winery/repository/resources/entitytypes/policytypes/LanguageResource.java @@ -0,0 +1,28 @@ +package org.eclipse.winery.repository.resources.entitytypes.policytypes; + +import javax.ws.rs.GET; +import javax.ws.rs.Produces; +import javax.ws.rs.core.MediaType; + +import com.sun.jersey.api.view.Viewable; + +public class LanguageResource { + + private PolicyTypeResource policyTypeResource; + + + public LanguageResource(PolicyTypeResource policyTypeResource) { + this.policyTypeResource = policyTypeResource; + } + + @GET + @Produces(MediaType.TEXT_HTML) + public Viewable getHTML() { + return new Viewable("/jsp/entitytypes/policytypes/language.jsp", this); + } + + public String getLanguage() { + return this.policyTypeResource.getPolicyType().getPolicyLanguage(); + } + +} |