From c166a1a0ac70a69aea80b9323f92e89c7e3574ac Mon Sep 17 00:00:00 2001 From: Andrew Berezovskyi Date: Sun, 28 Dec 2025 18:18:27 +0100 Subject: [PATCH] gen: after domains sync upstream --- .../oslc/refimpl/cm/gen/ResourcesFactory.java | 10 + .../co/oslc/refimpl/cm/gen/RestDelegate.java | 580 +++++++++--------- .../gen/services/Change_requestsService.java | 424 ++++++++++--- .../cm/gen/services/WsChangeRequest.java | 40 +- .../refimpl/cm/gen/servlet/Application.java | 40 +- .../gen/servlet/ServiceProvidersFactory.java | 244 ++++---- .../refimpl/cm/gen/changenoticecreator.jsp | 63 ++ .../co/oslc/refimpl/cm/gen/defectcreator.jsp | 63 ++ .../refimpl/cm/gen/enhancementcreator.jsp | 63 ++ .../oslc/refimpl/cm/gen/reviewtaskcreator.jsp | 63 ++ .../co/oslc/refimpl/cm/gen/taskcreator.jsp | 63 ++ 11 files changed, 1144 insertions(+), 509 deletions(-) diff --git a/src/server-cm/src/main/java/co/oslc/refimpl/cm/gen/ResourcesFactory.java b/src/server-cm/src/main/java/co/oslc/refimpl/cm/gen/ResourcesFactory.java index f728c2eb..4b3c456c 100644 --- a/src/server-cm/src/main/java/co/oslc/refimpl/cm/gen/ResourcesFactory.java +++ b/src/server-cm/src/main/java/co/oslc/refimpl/cm/gen/ResourcesFactory.java @@ -30,6 +30,7 @@ import org.eclipse.lyo.oslc4j.core.model.Link; import org.eclipse.lyo.oslc4j.core.OSLC4JUtils; import org.eclipse.lyo.oslc.domains.Agent; +import org.eclipse.lyo.oslc4j.core.model.AllowedValues; import org.eclipse.lyo.oslc.domains.cm.ChangeNotice; import org.eclipse.lyo.oslc.domains.cm.ChangeRequest; import org.eclipse.lyo.oslc.domains.config.ChangeSet; @@ -38,14 +39,23 @@ import org.eclipse.lyo.oslc.domains.config.ConceptResource; import org.eclipse.lyo.oslc.domains.config.Configuration; import org.eclipse.lyo.oslc.domains.config.Contribution; +import org.eclipse.lyo.oslc4j.core.model.CreationFactory; import org.eclipse.lyo.oslc.domains.cm.Defect; +import org.eclipse.lyo.oslc4j.core.model.Dialog; import org.eclipse.lyo.oslc4j.core.model.Discussion; import org.eclipse.lyo.oslc.domains.cm.Enhancement; import org.eclipse.lyo.oslc.domains.Person; import org.eclipse.lyo.oslc.domains.cm.Priority; +import org.eclipse.lyo.oslc4j.core.model.Property; +import org.eclipse.lyo.oslc4j.core.model.Publisher; +import org.eclipse.lyo.oslc4j.core.model.QueryCapability; import org.eclipse.lyo.oslc.domains.rm.Requirement; +import org.eclipse.lyo.oslc4j.core.model.ResourceShape; import org.eclipse.lyo.oslc.domains.cm.ReviewTask; import org.eclipse.lyo.oslc.domains.config.Selections; +import org.eclipse.lyo.oslc4j.core.model.Service; +import org.eclipse.lyo.oslc4j.core.model.ServiceProvider; +import org.eclipse.lyo.oslc.domains.cm.Severity; import org.eclipse.lyo.oslc.domains.cm.State; import org.eclipse.lyo.oslc.domains.cm.Task; import org.eclipse.lyo.oslc.domains.config.VersionResource; diff --git a/src/server-cm/src/main/java/co/oslc/refimpl/cm/gen/RestDelegate.java b/src/server-cm/src/main/java/co/oslc/refimpl/cm/gen/RestDelegate.java index de9be87d..eb498f39 100644 --- a/src/server-cm/src/main/java/co/oslc/refimpl/cm/gen/RestDelegate.java +++ b/src/server-cm/src/main/java/co/oslc/refimpl/cm/gen/RestDelegate.java @@ -20,48 +20,58 @@ * * This file is generated by org.eclipse.lyo.oslc4j.codegenerator *******************************************************************************/ -// End of user code - -package co.oslc.refimpl.cm.gen; - - -// spotless:off -import jakarta.inject.Inject; -import jakarta.servlet.http.HttpServletRequest; -import jakarta.servlet.ServletContextEvent; -import java.util.List; -import java.util.ArrayList; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import org.eclipse.lyo.oslc4j.core.model.ServiceProvider; -import org.eclipse.lyo.oslc4j.core.OSLC4JUtils; -import org.eclipse.lyo.oslc4j.core.model.AbstractResource; -import co.oslc.refimpl.cm.gen.servlet.ServiceProviderCatalogSingleton; -import co.oslc.refimpl.cm.gen.ServiceProviderInfo; -import org.eclipse.lyo.oslc.domains.Agent; -import org.eclipse.lyo.oslc.domains.cm.ChangeNotice; -import org.eclipse.lyo.oslc.domains.cm.ChangeRequest; -import org.eclipse.lyo.oslc.domains.config.ChangeSet; -import org.eclipse.lyo.oslc.domains.RdfsClass; -import org.eclipse.lyo.oslc.domains.config.Component; -import org.eclipse.lyo.oslc.domains.config.ConceptResource; -import org.eclipse.lyo.oslc.domains.config.Configuration; -import org.eclipse.lyo.oslc.domains.config.Contribution; -import org.eclipse.lyo.oslc.domains.cm.Defect; -import org.eclipse.lyo.oslc4j.core.model.Discussion; -import org.eclipse.lyo.oslc.domains.cm.Enhancement; -import org.eclipse.lyo.oslc.domains.Person; -import org.eclipse.lyo.oslc.domains.cm.Priority; -import org.eclipse.lyo.oslc.domains.rm.Requirement; -import org.eclipse.lyo.oslc.domains.cm.ReviewTask; -import org.eclipse.lyo.oslc.domains.config.Selections; -import org.eclipse.lyo.oslc.domains.cm.State; -import org.eclipse.lyo.oslc.domains.cm.Task; -import org.eclipse.lyo.oslc.domains.config.VersionResource; - - - +// End of user code + +package co.oslc.refimpl.cm.gen; + + +// spotless:off +import jakarta.inject.Inject; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.ServletContextEvent; +import java.util.List; +import java.util.ArrayList; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import org.eclipse.lyo.oslc4j.core.model.ServiceProvider; +import org.eclipse.lyo.oslc4j.core.OSLC4JUtils; +import org.eclipse.lyo.oslc4j.core.model.AbstractResource; +import co.oslc.refimpl.cm.gen.servlet.ServiceProviderCatalogSingleton; +import co.oslc.refimpl.cm.gen.ServiceProviderInfo; +import org.eclipse.lyo.oslc.domains.Agent; +import org.eclipse.lyo.oslc4j.core.model.AllowedValues; +import org.eclipse.lyo.oslc.domains.cm.ChangeNotice; +import org.eclipse.lyo.oslc.domains.cm.ChangeRequest; +import org.eclipse.lyo.oslc.domains.config.ChangeSet; +import org.eclipse.lyo.oslc.domains.RdfsClass; +import org.eclipse.lyo.oslc.domains.config.Component; +import org.eclipse.lyo.oslc.domains.config.ConceptResource; +import org.eclipse.lyo.oslc.domains.config.Configuration; +import org.eclipse.lyo.oslc.domains.config.Contribution; +import org.eclipse.lyo.oslc4j.core.model.CreationFactory; +import org.eclipse.lyo.oslc.domains.cm.Defect; +import org.eclipse.lyo.oslc4j.core.model.Dialog; +import org.eclipse.lyo.oslc4j.core.model.Discussion; +import org.eclipse.lyo.oslc.domains.cm.Enhancement; +import org.eclipse.lyo.oslc.domains.Person; +import org.eclipse.lyo.oslc.domains.cm.Priority; +import org.eclipse.lyo.oslc4j.core.model.Property; +import org.eclipse.lyo.oslc4j.core.model.Publisher; +import org.eclipse.lyo.oslc4j.core.model.QueryCapability; +import org.eclipse.lyo.oslc.domains.rm.Requirement; +import org.eclipse.lyo.oslc4j.core.model.ResourceShape; +import org.eclipse.lyo.oslc.domains.cm.ReviewTask; +import org.eclipse.lyo.oslc.domains.config.Selections; +import org.eclipse.lyo.oslc4j.core.model.Service; +import org.eclipse.lyo.oslc4j.core.model.ServiceProvider; +import org.eclipse.lyo.oslc.domains.cm.Severity; +import org.eclipse.lyo.oslc.domains.cm.State; +import org.eclipse.lyo.oslc.domains.cm.Task; +import org.eclipse.lyo.oslc.domains.config.VersionResource; + + + // Start of user code imports import java.net.URI; import java.util.Date; @@ -73,197 +83,197 @@ import co.oslc.refimpl.lib.MemResourceRepository; import co.oslc.refimpl.lib.ResourceRepository; -// End of user code -// spotless:on - +// End of user code +// spotless:on + // Start of user code pre_class_code -// End of user code - -public class RestDelegate { - - private static final Logger log = LoggerFactory.getLogger(RestDelegate.class); - - - - @Inject ResourcesFactory resourcesFactory; +// End of user code + +public class RestDelegate { + + private static final Logger log = LoggerFactory.getLogger(RestDelegate.class); + + + + @Inject ResourcesFactory resourcesFactory; // Start of user code class_attributes public static final String SP_DEFAULT = "sp_single"; private static final Logger LOG = LoggerFactory.getLogger(RestDelegate.class); private static final ResourceRepository changeRequestRepository = new MemResourceRepository<>(); - // End of user code - - public RestDelegate() { - log.trace("Delegate is initialized"); - } - - + // End of user code + + public RestDelegate() { + log.trace("Delegate is initialized"); + } + + // Start of user code class_methods - // End of user code - - //The methods contextInitializeServletListener() and contextDestroyServletListener() no longer exits - //Migrate any user-specific code blocks to the class co.oslc.refimpl.cm.gen.servlet.ServletListener - //Any user-specific code should be found in *.lost files. - - public static ServiceProviderInfo[] getServiceProviderInfos(HttpServletRequest httpServletRequest) - { - ServiceProviderInfo[] serviceProviderInfos = {}; - + // End of user code + + //The methods contextInitializeServletListener() and contextDestroyServletListener() no longer exits + //Migrate any user-specific code blocks to the class co.oslc.refimpl.cm.gen.servlet.ServletListener + //Any user-specific code should be found in *.lost files. + + public static ServiceProviderInfo[] getServiceProviderInfos(HttpServletRequest httpServletRequest) + { + ServiceProviderInfo[] serviceProviderInfos = {}; + // Start of user code "ServiceProviderInfo[] getServiceProviderInfos(...)" ServiceProviderInfo spInfo = new ServiceProviderInfo(); spInfo.serviceProviderId = SP_DEFAULT; spInfo.name = "Default ServiceProvider"; serviceProviderInfos = new ServiceProviderInfo[] {spInfo}; - // End of user code - return serviceProviderInfos; - } - - public List queryChangeRequests(HttpServletRequest httpServletRequest, String where, String prefix, boolean paging, int page, int limit) - { - List resources = null; - - + // End of user code + return serviceProviderInfos; + } + + public List queryChangeRequests(HttpServletRequest httpServletRequest, String where, String prefix, boolean paging, int page, int limit) + { + List resources = null; + + // Start of user code queryChangeRequests resources = changeRequestRepository.fetchResourcePageForSP(SP_DEFAULT, page, limit); - // End of user code - return resources; - } - public List queryDefects(HttpServletRequest httpServletRequest, String where, String prefix, boolean paging, int page, int limit) - { - List resources = null; - - + // End of user code + return resources; + } + public List queryDefects(HttpServletRequest httpServletRequest, String where, String prefix, boolean paging, int page, int limit) + { + List resources = null; + + // Start of user code queryDefects // TODO Implement code to return a set of resources. // An empty List should imply that no resources where found. // If you encounter problems, consider throwing the runtime exception WebApplicationException(message, cause, final httpStatus) LOG.warn("QC for Defect resources not implemented"); resources = new ArrayList<>(); - // End of user code - return resources; - } - public List queryTasks(HttpServletRequest httpServletRequest, String where, String prefix, boolean paging, int page, int limit) - { - List resources = null; - - + // End of user code + return resources; + } + public List queryTasks(HttpServletRequest httpServletRequest, String where, String prefix, boolean paging, int page, int limit) + { + List resources = null; + + // Start of user code queryTasks // TODO Implement code to return a set of resources. // An empty List should imply that no resources where found. // If you encounter problems, consider throwing the runtime exception WebApplicationException(message, cause, final httpStatus) LOG.warn("QC for Task resources not implemented"); resources = new ArrayList<>(); - // End of user code - return resources; - } - public List queryEnhancements(HttpServletRequest httpServletRequest, String where, String prefix, boolean paging, int page, int limit) - { - List resources = null; - - + // End of user code + return resources; + } + public List queryEnhancements(HttpServletRequest httpServletRequest, String where, String prefix, boolean paging, int page, int limit) + { + List resources = null; + + // Start of user code queryEnhancements // TODO Implement code to return a set of resources. // An empty List should imply that no resources where found. // If you encounter problems, consider throwing the runtime exception WebApplicationException(message, cause, final httpStatus) LOG.warn("QC for Enhancement resources not implemented"); resources = new ArrayList<>(); - // End of user code - return resources; - } - public List queryReviewTasks(HttpServletRequest httpServletRequest, String where, String prefix, boolean paging, int page, int limit) - { - List resources = null; - - + // End of user code + return resources; + } + public List queryReviewTasks(HttpServletRequest httpServletRequest, String where, String prefix, boolean paging, int page, int limit) + { + List resources = null; + + // Start of user code queryReviewTasks // TODO Implement code to return a set of resources. // An empty List should imply that no resources where found. // If you encounter problems, consider throwing the runtime exception WebApplicationException(message, cause, final httpStatus) LOG.warn("QC for Review resources not implemented"); resources = new ArrayList<>(); - // End of user code - return resources; - } - public List queryChangeNotices(HttpServletRequest httpServletRequest, String where, String prefix, boolean paging, int page, int limit) - { - List resources = null; - - + // End of user code + return resources; + } + public List queryChangeNotices(HttpServletRequest httpServletRequest, String where, String prefix, boolean paging, int page, int limit) + { + List resources = null; + + // Start of user code queryChangeNotices // TODO Implement code to return a set of resources. // An empty List should imply that no resources where found. // If you encounter problems, consider throwing the runtime exception WebApplicationException(message, cause, final httpStatus) LOG.warn("QC for ChangeNotice resources not implemented"); resources = new ArrayList<>(); - // End of user code - return resources; - } - public List ChangeRequestSelector(HttpServletRequest httpServletRequest, String terms) - { - List resources = null; - - + // End of user code + return resources; + } + public List ChangeRequestSelector(HttpServletRequest httpServletRequest, String terms) + { + List resources = null; + + // Start of user code ChangeRequestSelector // resources = changeRequestRepository.fetchResourcePageForSP(SP_DEFAULT, 1, 20); resources = changeRequestRepository.findResources(SP_DEFAULT, terms, 20); - // End of user code - return resources; - } - public List DefectSelector(HttpServletRequest httpServletRequest, String terms) - { - List resources = null; - - + // End of user code + return resources; + } + public List DefectSelector(HttpServletRequest httpServletRequest, String terms) + { + List resources = null; + + // Start of user code DefectSelector // TODO Implement code to return a set of resources, based on search criteria - // End of user code - return resources; - } - public List TaskSelector(HttpServletRequest httpServletRequest, String terms) - { - List resources = null; - - + // End of user code + return resources; + } + public List TaskSelector(HttpServletRequest httpServletRequest, String terms) + { + List resources = null; + + // Start of user code TaskSelector // TODO Implement code to return a set of resources, based on search criteria - // End of user code - return resources; - } - public List ReviewTaskSelector(HttpServletRequest httpServletRequest, String terms) - { - List resources = null; - - + // End of user code + return resources; + } + public List ReviewTaskSelector(HttpServletRequest httpServletRequest, String terms) + { + List resources = null; + + // Start of user code ReviewTaskSelector // TODO Implement code to return a set of resources, based on search criteria - // End of user code - return resources; - } - public List ChangeNoticeSelector(HttpServletRequest httpServletRequest, String terms) - { - List resources = null; - - + // End of user code + return resources; + } + public List ChangeNoticeSelector(HttpServletRequest httpServletRequest, String terms) + { + List resources = null; + + // Start of user code ChangeNoticeSelector // TODO Implement code to return a set of resources, based on search criteria - // End of user code - return resources; - } - public List EnhancementSelector(HttpServletRequest httpServletRequest, String terms) - { - List resources = null; - - + // End of user code + return resources; + } + public List EnhancementSelector(HttpServletRequest httpServletRequest, String terms) + { + List resources = null; + + // Start of user code EnhancementSelector // TODO Implement code to return a set of resources, based on search criteria - // End of user code - return resources; - } - public ChangeRequest createChangeRequest(HttpServletRequest httpServletRequest, final ChangeRequest aResource) - { - ChangeRequest newResource = null; - - + // End of user code + return resources; + } + public ChangeRequest createChangeRequest(HttpServletRequest httpServletRequest, final ChangeRequest aResource) + { + ChangeRequest newResource = null; + + // Start of user code createChangeRequest String id = aResource.getIdentifier(); if(id == null) { @@ -275,68 +285,68 @@ public ChangeRequest createChangeRequest(HttpServletRequest httpServletRequest, aResource.setCreated(new Date()); changeRequestRepository.addResource(SP_DEFAULT, id, aResource); newResource = aResource; - // End of user code - return newResource; - } - - public Defect createDefectFromDialog(HttpServletRequest httpServletRequest, final Defect aResource) - { - Defect newResource = null; - - + // End of user code + return newResource; + } + + public Defect createDefectFromDialog(HttpServletRequest httpServletRequest, final Defect aResource) + { + Defect newResource = null; + + // Start of user code createDefectFromDialog // TODO Implement code to create a resource - // End of user code - return newResource; - } - public Task createTaskFromDialog(HttpServletRequest httpServletRequest, final Task aResource) - { - Task newResource = null; - - + // End of user code + return newResource; + } + public Task createTaskFromDialog(HttpServletRequest httpServletRequest, final Task aResource) + { + Task newResource = null; + + // Start of user code createTaskFromDialog // TODO Implement code to create a resource - // End of user code - return newResource; - } - public ReviewTask createReviewTaskFromDialog(HttpServletRequest httpServletRequest, final ReviewTask aResource) - { - ReviewTask newResource = null; - - + // End of user code + return newResource; + } + public ReviewTask createReviewTaskFromDialog(HttpServletRequest httpServletRequest, final ReviewTask aResource) + { + ReviewTask newResource = null; + + // Start of user code createReviewTaskFromDialog // TODO Implement code to create a resource - // End of user code - return newResource; - } - public ChangeNotice createChangeNoticeFromDialog(HttpServletRequest httpServletRequest, final ChangeNotice aResource) - { - ChangeNotice newResource = null; - - + // End of user code + return newResource; + } + public ChangeNotice createChangeNoticeFromDialog(HttpServletRequest httpServletRequest, final ChangeNotice aResource) + { + ChangeNotice newResource = null; + + // Start of user code createChangeNoticeFromDialog // TODO Implement code to create a resource - // End of user code - return newResource; - } - public Enhancement createEnhancementFromDialog(HttpServletRequest httpServletRequest, final Enhancement aResource) - { - Enhancement newResource = null; - - + // End of user code + return newResource; + } + public Enhancement createEnhancementFromDialog(HttpServletRequest httpServletRequest, final Enhancement aResource) + { + Enhancement newResource = null; + + // Start of user code createEnhancementFromDialog // TODO Implement code to create a resource - // End of user code - return newResource; - } - - - - public ChangeRequest getChangeRequest(HttpServletRequest httpServletRequest, final String id) - { - ChangeRequest aResource = null; - - + // End of user code + return newResource; + } + + + + public ChangeRequest getChangeRequest(HttpServletRequest httpServletRequest, final String id) + { + ChangeRequest aResource = null; + + // Start of user code getChangeRequest try { aResource = changeRequestRepository.getResource(SP_DEFAULT, id); @@ -344,24 +354,24 @@ public ChangeRequest getChangeRequest(HttpServletRequest httpServletRequest, fin return null; // throw new WebApplicationException(Response.Status.NOT_FOUND); } - // End of user code - return aResource; - } - - public Boolean deleteChangeRequest(HttpServletRequest httpServletRequest, final String id) - { - Boolean deleted = false; - + // End of user code + return aResource; + } + + public Boolean deleteChangeRequest(HttpServletRequest httpServletRequest, final String id) + { + Boolean deleted = false; + // Start of user code deleteChangeRequest changeRequestRepository.deleteResource(SP_DEFAULT, id); deleted = true; - // End of user code - return deleted; - } - - public ChangeRequest updateChangeRequest(HttpServletRequest httpServletRequest, final ChangeRequest aResource, final String id) { - ChangeRequest updatedResource = null; - + // End of user code + return deleted; + } + + public ChangeRequest updateChangeRequest(HttpServletRequest httpServletRequest, final ChangeRequest aResource, final String id) { + ChangeRequest updatedResource = null; + // Start of user code updateChangeRequest if(!resourcesFactory.constructURIForChangeRequest(id).equals(aResource.getAbout())) { throw new WebApplicationException("Subject URI shall match the endpoint", Response.Status.BAD_REQUEST); @@ -369,57 +379,57 @@ public ChangeRequest updateChangeRequest(HttpServletRequest httpServletRequest, aResource.setModified(new Date()); changeRequestRepository.updateResource(SP_DEFAULT, id, aResource); updatedResource = aResource; - // End of user code - return updatedResource; - } - - public String getETagFromChangeNotice(final ChangeNotice aResource) - { - String eTag = null; + // End of user code + return updatedResource; + } + + public String getETagFromChangeNotice(final ChangeNotice aResource) + { + String eTag = null; // Start of user code getETagFromChangeNotice eTag = changeRequestRepository.calculateETag(aResource); - // End of user code - return eTag; - } - public String getETagFromChangeRequest(final ChangeRequest aResource) - { - String eTag = null; + // End of user code + return eTag; + } + public String getETagFromChangeRequest(final ChangeRequest aResource) + { + String eTag = null; // Start of user code getETagFromChangeRequest eTag = changeRequestRepository.calculateETag(aResource); - // End of user code - return eTag; - } - public String getETagFromDefect(final Defect aResource) - { - String eTag = null; + // End of user code + return eTag; + } + public String getETagFromDefect(final Defect aResource) + { + String eTag = null; // Start of user code getETagFromDefect eTag = changeRequestRepository.calculateETag(aResource); - // End of user code - return eTag; - } - public String getETagFromEnhancement(final Enhancement aResource) - { - String eTag = null; + // End of user code + return eTag; + } + public String getETagFromEnhancement(final Enhancement aResource) + { + String eTag = null; // Start of user code getETagFromEnhancement eTag = changeRequestRepository.calculateETag(aResource); - // End of user code - return eTag; - } - public String getETagFromReviewTask(final ReviewTask aResource) - { - String eTag = null; + // End of user code + return eTag; + } + public String getETagFromReviewTask(final ReviewTask aResource) + { + String eTag = null; // Start of user code getETagFromReviewTask eTag = changeRequestRepository.calculateETag(aResource); - // End of user code - return eTag; - } - public String getETagFromTask(final Task aResource) - { - String eTag = null; + // End of user code + return eTag; + } + public String getETagFromTask(final Task aResource) + { + String eTag = null; // Start of user code getETagFromTask eTag = changeRequestRepository.calculateETag(aResource); - // End of user code - return eTag; - } - -} + // End of user code + return eTag; + } + +} diff --git a/src/server-cm/src/main/java/co/oslc/refimpl/cm/gen/services/Change_requestsService.java b/src/server-cm/src/main/java/co/oslc/refimpl/cm/gen/services/Change_requestsService.java index 33a678c0..b99ba47c 100644 --- a/src/server-cm/src/main/java/co/oslc/refimpl/cm/gen/services/Change_requestsService.java +++ b/src/server-cm/src/main/java/co/oslc/refimpl/cm/gen/services/Change_requestsService.java @@ -85,15 +85,16 @@ import co.oslc.refimpl.cm.gen.RestDelegate; import co.oslc.refimpl.cm.gen.ServerConstants; -import org.eclipse.lyo.oslc.domains.cm.Oslc_cmDomainConstants; -import org.eclipse.lyo.oslc.domains.cm.Oslc_cmDomainConstants; -import org.eclipse.lyo.oslc.domains.cm.Oslc_cmDomainConstants; -import org.eclipse.lyo.oslc.domains.cm.Oslc_cmDomainConstants; -import org.eclipse.lyo.oslc.domains.cm.Oslc_cmDomainConstants; -import org.eclipse.lyo.oslc.domains.cm.Oslc_cmDomainConstants; -import org.eclipse.lyo.oslc.domains.cm.Oslc_cmDomainConstants; +import org.eclipse.lyo.oslc.domains.cm.Oslc_cm_shapesDomainConstants; +import org.eclipse.lyo.oslc.domains.cm.Oslc_cm_shapesDomainConstants; +import org.eclipse.lyo.oslc.domains.cm.Oslc_cm_shapesDomainConstants; +import org.eclipse.lyo.oslc.domains.cm.Oslc_cm_shapesDomainConstants; +import org.eclipse.lyo.oslc.domains.cm.Oslc_cm_shapesDomainConstants; +import org.eclipse.lyo.oslc.domains.cm.Oslc_cm_shapesDomainConstants; +import org.eclipse.lyo.oslc.domains.cm.Oslc_cm_shapesDomainConstants; import co.oslc.refimpl.cm.gen.servlet.ServiceProviderCatalogSingleton; import org.eclipse.lyo.oslc.domains.Agent; +import org.eclipse.lyo.oslc4j.core.model.AllowedValues; import org.eclipse.lyo.oslc.domains.cm.ChangeNotice; import org.eclipse.lyo.oslc.domains.cm.ChangeRequest; import org.eclipse.lyo.oslc.domains.config.ChangeSet; @@ -102,14 +103,23 @@ import org.eclipse.lyo.oslc.domains.config.ConceptResource; import org.eclipse.lyo.oslc.domains.config.Configuration; import org.eclipse.lyo.oslc.domains.config.Contribution; +import org.eclipse.lyo.oslc4j.core.model.CreationFactory; import org.eclipse.lyo.oslc.domains.cm.Defect; +import org.eclipse.lyo.oslc4j.core.model.Dialog; import org.eclipse.lyo.oslc4j.core.model.Discussion; import org.eclipse.lyo.oslc.domains.cm.Enhancement; import org.eclipse.lyo.oslc.domains.Person; import org.eclipse.lyo.oslc.domains.cm.Priority; +import org.eclipse.lyo.oslc4j.core.model.Property; +import org.eclipse.lyo.oslc4j.core.model.Publisher; +import org.eclipse.lyo.oslc4j.core.model.QueryCapability; import org.eclipse.lyo.oslc.domains.rm.Requirement; +import org.eclipse.lyo.oslc4j.core.model.ResourceShape; import org.eclipse.lyo.oslc.domains.cm.ReviewTask; import org.eclipse.lyo.oslc.domains.config.Selections; +import org.eclipse.lyo.oslc4j.core.model.Service; +import org.eclipse.lyo.oslc4j.core.model.ServiceProvider; +import org.eclipse.lyo.oslc.domains.cm.Severity; import org.eclipse.lyo.oslc.domains.cm.State; import org.eclipse.lyo.oslc.domains.cm.Task; import org.eclipse.lyo.oslc.domains.config.VersionResource; @@ -123,7 +133,7 @@ // Start of user code pre_class_code // End of user code -@OslcService(Oslc_cmDomainConstants.CHANGE_MANAGEMENT_SHAPES_NAMSPACE) +@OslcService(Oslc_cm_shapesDomainConstants.CHANGE_MANAGEMENT_SHAPES_NAMSPACE) @Path("resources") public class Change_requestsService { @@ -149,17 +159,17 @@ public Change_requestsService() ( title = "ChangeRequest QC", label = "ChangeRequest Query Capability", - resourceShape = OslcConstants.PATH_RESOURCE_SHAPES + "/" + Oslc_cmDomainConstants.CHANGEREQUEST_PATH, - resourceTypes = {Oslc_cmDomainConstants.CHANGEREQUEST_TYPE}, + resourceShape = OslcConstants.PATH_RESOURCE_SHAPES + "/" + Oslc_cm_shapesDomainConstants.CHANGEREQUEST_PATH, + resourceTypes = {Oslc_cm_shapesDomainConstants.CHANGEREQUEST_TYPE}, usages = {} ) @GET @Path("query_cr") @Produces({OslcMediaType.APPLICATION_RDF_XML, OslcMediaType.APPLICATION_JSON_LD, OslcMediaType.TEXT_TURTLE, OslcMediaType.APPLICATION_XML, OslcMediaType.APPLICATION_JSON}) @Operation( - summary = "Query capability for resources of type {" + Oslc_cmDomainConstants.CHANGEREQUEST_LOCALNAME + "}", - description = "Query capability for resources of type {" + "" + Oslc_cmDomainConstants.CHANGEREQUEST_LOCALNAME + "" + "}" + - ", with respective resource shapes {" + "" + Oslc_cmDomainConstants.CHANGEREQUEST_LOCALNAME + "" + "}", + summary = "Query capability for resources of type {" + Oslc_cm_shapesDomainConstants.CHANGEREQUEST_LOCALNAME + "}", + description = "Query capability for resources of type {" + "" + Oslc_cm_shapesDomainConstants.CHANGEREQUEST_LOCALNAME + "" + "}" + + ", with respective resource shapes {" + "" + Oslc_cm_shapesDomainConstants.CHANGEREQUEST_LOCALNAME + "" + "}", responses = { @ApiResponse(description = "default response", content = {@Content(mediaType = OslcMediaType.APPLICATION_RDF_XML), @Content(mediaType = OslcMediaType.APPLICATION_XML), @Content(mediaType = OslcMediaType.APPLICATION_JSON), @Content(mediaType = OslcMediaType.TEXT_TURTLE), @Content(mediaType = MediaType.TEXT_HTML)}) } @@ -214,9 +224,9 @@ public ChangeRequest[] queryChangeRequests( @Path("query_cr") @Produces({ MediaType.TEXT_HTML }) @Operation( - summary = "Query capability for resources of type {" + Oslc_cmDomainConstants.CHANGEREQUEST_LOCALNAME + "}", - description = "Query capability for resources of type {" + "" + Oslc_cmDomainConstants.CHANGEREQUEST_LOCALNAME + "" + "}" + - ", with respective resource shapes {" + "" + Oslc_cmDomainConstants.CHANGEREQUEST_LOCALNAME + "" + "}", + summary = "Query capability for resources of type {" + Oslc_cm_shapesDomainConstants.CHANGEREQUEST_LOCALNAME + "}", + description = "Query capability for resources of type {" + "" + Oslc_cm_shapesDomainConstants.CHANGEREQUEST_LOCALNAME + "" + "}" + + ", with respective resource shapes {" + "" + Oslc_cm_shapesDomainConstants.CHANGEREQUEST_LOCALNAME + "" + "}", responses = { @ApiResponse(description = "default response", content = {@Content(mediaType = OslcMediaType.APPLICATION_RDF_XML), @Content(mediaType = OslcMediaType.APPLICATION_XML), @Content(mediaType = OslcMediaType.APPLICATION_JSON), @Content(mediaType = OslcMediaType.TEXT_TURTLE), @Content(mediaType = MediaType.TEXT_HTML)}) } @@ -281,17 +291,17 @@ public void queryChangeRequestsAsHtml( ( title = "Defect QC", label = "Defect Query Capability", - resourceShape = OslcConstants.PATH_RESOURCE_SHAPES + "/" + Oslc_cmDomainConstants.DEFECT_PATH, - resourceTypes = {Oslc_cmDomainConstants.DEFECT_TYPE}, + resourceShape = OslcConstants.PATH_RESOURCE_SHAPES + "/" + Oslc_cm_shapesDomainConstants.DEFECT_PATH, + resourceTypes = {Oslc_cm_shapesDomainConstants.DEFECT_TYPE}, usages = {} ) @GET @Path("query_defect") @Produces({OslcMediaType.APPLICATION_RDF_XML, OslcMediaType.APPLICATION_JSON_LD, OslcMediaType.TEXT_TURTLE, OslcMediaType.APPLICATION_XML, OslcMediaType.APPLICATION_JSON}) @Operation( - summary = "Query capability for resources of type {" + Oslc_cmDomainConstants.DEFECT_LOCALNAME + "}", - description = "Query capability for resources of type {" + "" + Oslc_cmDomainConstants.DEFECT_LOCALNAME + "" + "}" + - ", with respective resource shapes {" + "" + Oslc_cmDomainConstants.DEFECT_LOCALNAME + "" + "}", + summary = "Query capability for resources of type {" + Oslc_cm_shapesDomainConstants.DEFECT_LOCALNAME + "}", + description = "Query capability for resources of type {" + "" + Oslc_cm_shapesDomainConstants.DEFECT_LOCALNAME + "" + "}" + + ", with respective resource shapes {" + "" + Oslc_cm_shapesDomainConstants.DEFECT_LOCALNAME + "" + "}", responses = { @ApiResponse(description = "default response", content = {@Content(mediaType = OslcMediaType.APPLICATION_RDF_XML), @Content(mediaType = OslcMediaType.APPLICATION_XML), @Content(mediaType = OslcMediaType.APPLICATION_JSON), @Content(mediaType = OslcMediaType.TEXT_TURTLE), @Content(mediaType = MediaType.TEXT_HTML)}) } @@ -346,9 +356,9 @@ public Defect[] queryDefects( @Path("query_defect") @Produces({ MediaType.TEXT_HTML }) @Operation( - summary = "Query capability for resources of type {" + Oslc_cmDomainConstants.DEFECT_LOCALNAME + "}", - description = "Query capability for resources of type {" + "" + Oslc_cmDomainConstants.DEFECT_LOCALNAME + "" + "}" + - ", with respective resource shapes {" + "" + Oslc_cmDomainConstants.DEFECT_LOCALNAME + "" + "}", + summary = "Query capability for resources of type {" + Oslc_cm_shapesDomainConstants.DEFECT_LOCALNAME + "}", + description = "Query capability for resources of type {" + "" + Oslc_cm_shapesDomainConstants.DEFECT_LOCALNAME + "" + "}" + + ", with respective resource shapes {" + "" + Oslc_cm_shapesDomainConstants.DEFECT_LOCALNAME + "" + "}", responses = { @ApiResponse(description = "default response", content = {@Content(mediaType = OslcMediaType.APPLICATION_RDF_XML), @Content(mediaType = OslcMediaType.APPLICATION_XML), @Content(mediaType = OslcMediaType.APPLICATION_JSON), @Content(mediaType = OslcMediaType.TEXT_TURTLE), @Content(mediaType = MediaType.TEXT_HTML)}) } @@ -413,17 +423,17 @@ public void queryDefectsAsHtml( ( title = "Task QC", label = "Task Query Capability", - resourceShape = OslcConstants.PATH_RESOURCE_SHAPES + "/" + Oslc_cmDomainConstants.TASK_PATH, - resourceTypes = {Oslc_cmDomainConstants.TASK_TYPE}, + resourceShape = OslcConstants.PATH_RESOURCE_SHAPES + "/" + Oslc_cm_shapesDomainConstants.TASK_PATH, + resourceTypes = {Oslc_cm_shapesDomainConstants.TASK_TYPE}, usages = {} ) @GET @Path("query_task") @Produces({OslcMediaType.APPLICATION_RDF_XML, OslcMediaType.APPLICATION_JSON_LD, OslcMediaType.TEXT_TURTLE, OslcMediaType.APPLICATION_XML, OslcMediaType.APPLICATION_JSON}) @Operation( - summary = "Query capability for resources of type {" + Oslc_cmDomainConstants.TASK_LOCALNAME + "}", - description = "Query capability for resources of type {" + "" + Oslc_cmDomainConstants.TASK_LOCALNAME + "" + "}" + - ", with respective resource shapes {" + "" + Oslc_cmDomainConstants.TASK_LOCALNAME + "" + "}", + summary = "Query capability for resources of type {" + Oslc_cm_shapesDomainConstants.TASK_LOCALNAME + "}", + description = "Query capability for resources of type {" + "" + Oslc_cm_shapesDomainConstants.TASK_LOCALNAME + "" + "}" + + ", with respective resource shapes {" + "" + Oslc_cm_shapesDomainConstants.TASK_LOCALNAME + "" + "}", responses = { @ApiResponse(description = "default response", content = {@Content(mediaType = OslcMediaType.APPLICATION_RDF_XML), @Content(mediaType = OslcMediaType.APPLICATION_XML), @Content(mediaType = OslcMediaType.APPLICATION_JSON), @Content(mediaType = OslcMediaType.TEXT_TURTLE), @Content(mediaType = MediaType.TEXT_HTML)}) } @@ -478,9 +488,9 @@ public Task[] queryTasks( @Path("query_task") @Produces({ MediaType.TEXT_HTML }) @Operation( - summary = "Query capability for resources of type {" + Oslc_cmDomainConstants.TASK_LOCALNAME + "}", - description = "Query capability for resources of type {" + "" + Oslc_cmDomainConstants.TASK_LOCALNAME + "" + "}" + - ", with respective resource shapes {" + "" + Oslc_cmDomainConstants.TASK_LOCALNAME + "" + "}", + summary = "Query capability for resources of type {" + Oslc_cm_shapesDomainConstants.TASK_LOCALNAME + "}", + description = "Query capability for resources of type {" + "" + Oslc_cm_shapesDomainConstants.TASK_LOCALNAME + "" + "}" + + ", with respective resource shapes {" + "" + Oslc_cm_shapesDomainConstants.TASK_LOCALNAME + "" + "}", responses = { @ApiResponse(description = "default response", content = {@Content(mediaType = OslcMediaType.APPLICATION_RDF_XML), @Content(mediaType = OslcMediaType.APPLICATION_XML), @Content(mediaType = OslcMediaType.APPLICATION_JSON), @Content(mediaType = OslcMediaType.TEXT_TURTLE), @Content(mediaType = MediaType.TEXT_HTML)}) } @@ -545,17 +555,17 @@ public void queryTasksAsHtml( ( title = "Enhancement QC", label = "Enhancement Query Capability", - resourceShape = OslcConstants.PATH_RESOURCE_SHAPES + "/" + Oslc_cmDomainConstants.ENHANCEMENT_PATH, - resourceTypes = {Oslc_cmDomainConstants.ENHANCEMENT_TYPE}, + resourceShape = OslcConstants.PATH_RESOURCE_SHAPES + "/" + Oslc_cm_shapesDomainConstants.ENHANCEMENT_PATH, + resourceTypes = {Oslc_cm_shapesDomainConstants.ENHANCEMENT_TYPE}, usages = {} ) @GET @Path("query_enh") @Produces({OslcMediaType.APPLICATION_RDF_XML, OslcMediaType.APPLICATION_JSON_LD, OslcMediaType.TEXT_TURTLE, OslcMediaType.APPLICATION_XML, OslcMediaType.APPLICATION_JSON}) @Operation( - summary = "Query capability for resources of type {" + Oslc_cmDomainConstants.ENHANCEMENT_LOCALNAME + "}", - description = "Query capability for resources of type {" + "" + Oslc_cmDomainConstants.ENHANCEMENT_LOCALNAME + "" + "}" + - ", with respective resource shapes {" + "" + Oslc_cmDomainConstants.ENHANCEMENT_LOCALNAME + "" + "}", + summary = "Query capability for resources of type {" + Oslc_cm_shapesDomainConstants.ENHANCEMENT_LOCALNAME + "}", + description = "Query capability for resources of type {" + "" + Oslc_cm_shapesDomainConstants.ENHANCEMENT_LOCALNAME + "" + "}" + + ", with respective resource shapes {" + "" + Oslc_cm_shapesDomainConstants.ENHANCEMENT_LOCALNAME + "" + "}", responses = { @ApiResponse(description = "default response", content = {@Content(mediaType = OslcMediaType.APPLICATION_RDF_XML), @Content(mediaType = OslcMediaType.APPLICATION_XML), @Content(mediaType = OslcMediaType.APPLICATION_JSON), @Content(mediaType = OslcMediaType.TEXT_TURTLE), @Content(mediaType = MediaType.TEXT_HTML)}) } @@ -610,9 +620,9 @@ public Enhancement[] queryEnhancements( @Path("query_enh") @Produces({ MediaType.TEXT_HTML }) @Operation( - summary = "Query capability for resources of type {" + Oslc_cmDomainConstants.ENHANCEMENT_LOCALNAME + "}", - description = "Query capability for resources of type {" + "" + Oslc_cmDomainConstants.ENHANCEMENT_LOCALNAME + "" + "}" + - ", with respective resource shapes {" + "" + Oslc_cmDomainConstants.ENHANCEMENT_LOCALNAME + "" + "}", + summary = "Query capability for resources of type {" + Oslc_cm_shapesDomainConstants.ENHANCEMENT_LOCALNAME + "}", + description = "Query capability for resources of type {" + "" + Oslc_cm_shapesDomainConstants.ENHANCEMENT_LOCALNAME + "" + "}" + + ", with respective resource shapes {" + "" + Oslc_cm_shapesDomainConstants.ENHANCEMENT_LOCALNAME + "" + "}", responses = { @ApiResponse(description = "default response", content = {@Content(mediaType = OslcMediaType.APPLICATION_RDF_XML), @Content(mediaType = OslcMediaType.APPLICATION_XML), @Content(mediaType = OslcMediaType.APPLICATION_JSON), @Content(mediaType = OslcMediaType.TEXT_TURTLE), @Content(mediaType = MediaType.TEXT_HTML)}) } @@ -677,17 +687,17 @@ public void queryEnhancementsAsHtml( ( title = "Review QC", label = "ReviewTask Query Capability", - resourceShape = OslcConstants.PATH_RESOURCE_SHAPES + "/" + Oslc_cmDomainConstants.REVIEWTASK_PATH, - resourceTypes = {Oslc_cmDomainConstants.REVIEWTASK_TYPE}, + resourceShape = OslcConstants.PATH_RESOURCE_SHAPES + "/" + Oslc_cm_shapesDomainConstants.REVIEWTASK_PATH, + resourceTypes = {Oslc_cm_shapesDomainConstants.REVIEWTASK_TYPE}, usages = {} ) @GET @Path("query_review") @Produces({OslcMediaType.APPLICATION_RDF_XML, OslcMediaType.APPLICATION_JSON_LD, OslcMediaType.TEXT_TURTLE, OslcMediaType.APPLICATION_XML, OslcMediaType.APPLICATION_JSON}) @Operation( - summary = "Query capability for resources of type {" + Oslc_cmDomainConstants.REVIEWTASK_LOCALNAME + "}", - description = "Query capability for resources of type {" + "" + Oslc_cmDomainConstants.REVIEWTASK_LOCALNAME + "" + "}" + - ", with respective resource shapes {" + "" + Oslc_cmDomainConstants.REVIEWTASK_LOCALNAME + "" + "}", + summary = "Query capability for resources of type {" + Oslc_cm_shapesDomainConstants.REVIEWTASK_LOCALNAME + "}", + description = "Query capability for resources of type {" + "" + Oslc_cm_shapesDomainConstants.REVIEWTASK_LOCALNAME + "" + "}" + + ", with respective resource shapes {" + "" + Oslc_cm_shapesDomainConstants.REVIEWTASK_LOCALNAME + "" + "}", responses = { @ApiResponse(description = "default response", content = {@Content(mediaType = OslcMediaType.APPLICATION_RDF_XML), @Content(mediaType = OslcMediaType.APPLICATION_XML), @Content(mediaType = OslcMediaType.APPLICATION_JSON), @Content(mediaType = OslcMediaType.TEXT_TURTLE), @Content(mediaType = MediaType.TEXT_HTML)}) } @@ -742,9 +752,9 @@ public ReviewTask[] queryReviewTasks( @Path("query_review") @Produces({ MediaType.TEXT_HTML }) @Operation( - summary = "Query capability for resources of type {" + Oslc_cmDomainConstants.REVIEWTASK_LOCALNAME + "}", - description = "Query capability for resources of type {" + "" + Oslc_cmDomainConstants.REVIEWTASK_LOCALNAME + "" + "}" + - ", with respective resource shapes {" + "" + Oslc_cmDomainConstants.REVIEWTASK_LOCALNAME + "" + "}", + summary = "Query capability for resources of type {" + Oslc_cm_shapesDomainConstants.REVIEWTASK_LOCALNAME + "}", + description = "Query capability for resources of type {" + "" + Oslc_cm_shapesDomainConstants.REVIEWTASK_LOCALNAME + "" + "}" + + ", with respective resource shapes {" + "" + Oslc_cm_shapesDomainConstants.REVIEWTASK_LOCALNAME + "" + "}", responses = { @ApiResponse(description = "default response", content = {@Content(mediaType = OslcMediaType.APPLICATION_RDF_XML), @Content(mediaType = OslcMediaType.APPLICATION_XML), @Content(mediaType = OslcMediaType.APPLICATION_JSON), @Content(mediaType = OslcMediaType.TEXT_TURTLE), @Content(mediaType = MediaType.TEXT_HTML)}) } @@ -809,17 +819,17 @@ public void queryReviewTasksAsHtml( ( title = "ChangeNotice QC", label = "ChangeNotice Query Capability", - resourceShape = OslcConstants.PATH_RESOURCE_SHAPES + "/" + Oslc_cmDomainConstants.CHANGENOTICE_PATH, - resourceTypes = {Oslc_cmDomainConstants.CHANGENOTICE_TYPE}, + resourceShape = OslcConstants.PATH_RESOURCE_SHAPES + "/" + Oslc_cm_shapesDomainConstants.CHANGENOTICE_PATH, + resourceTypes = {Oslc_cm_shapesDomainConstants.CHANGENOTICE_TYPE}, usages = {} ) @GET @Path("query_cn") @Produces({OslcMediaType.APPLICATION_RDF_XML, OslcMediaType.APPLICATION_JSON_LD, OslcMediaType.TEXT_TURTLE, OslcMediaType.APPLICATION_XML, OslcMediaType.APPLICATION_JSON}) @Operation( - summary = "Query capability for resources of type {" + Oslc_cmDomainConstants.CHANGENOTICE_LOCALNAME + "}", - description = "Query capability for resources of type {" + "" + Oslc_cmDomainConstants.CHANGENOTICE_LOCALNAME + "" + "}" + - ", with respective resource shapes {" + "" + Oslc_cmDomainConstants.CHANGENOTICE_LOCALNAME + "" + "}", + summary = "Query capability for resources of type {" + Oslc_cm_shapesDomainConstants.CHANGENOTICE_LOCALNAME + "}", + description = "Query capability for resources of type {" + "" + Oslc_cm_shapesDomainConstants.CHANGENOTICE_LOCALNAME + "" + "}" + + ", with respective resource shapes {" + "" + Oslc_cm_shapesDomainConstants.CHANGENOTICE_LOCALNAME + "" + "}", responses = { @ApiResponse(description = "default response", content = {@Content(mediaType = OslcMediaType.APPLICATION_RDF_XML), @Content(mediaType = OslcMediaType.APPLICATION_XML), @Content(mediaType = OslcMediaType.APPLICATION_JSON), @Content(mediaType = OslcMediaType.TEXT_TURTLE), @Content(mediaType = MediaType.TEXT_HTML)}) } @@ -874,9 +884,9 @@ public ChangeNotice[] queryChangeNotices( @Path("query_cn") @Produces({ MediaType.TEXT_HTML }) @Operation( - summary = "Query capability for resources of type {" + Oslc_cmDomainConstants.CHANGENOTICE_LOCALNAME + "}", - description = "Query capability for resources of type {" + "" + Oslc_cmDomainConstants.CHANGENOTICE_LOCALNAME + "" + "}" + - ", with respective resource shapes {" + "" + Oslc_cmDomainConstants.CHANGENOTICE_LOCALNAME + "" + "}", + summary = "Query capability for resources of type {" + Oslc_cm_shapesDomainConstants.CHANGENOTICE_LOCALNAME + "}", + description = "Query capability for resources of type {" + "" + Oslc_cm_shapesDomainConstants.CHANGENOTICE_LOCALNAME + "" + "}" + + ", with respective resource shapes {" + "" + Oslc_cm_shapesDomainConstants.CHANGENOTICE_LOCALNAME + "" + "}", responses = { @ApiResponse(description = "default response", content = {@Content(mediaType = OslcMediaType.APPLICATION_RDF_XML), @Content(mediaType = OslcMediaType.APPLICATION_XML), @Content(mediaType = OslcMediaType.APPLICATION_JSON), @Content(mediaType = OslcMediaType.TEXT_TURTLE), @Content(mediaType = MediaType.TEXT_HTML)}) } @@ -944,7 +954,7 @@ public void queryChangeNoticesAsHtml( uri = "resources/select_change_request", hintWidth = "500px", hintHeight = "500px", - resourceTypes = {Oslc_cmDomainConstants.CHANGEREQUEST_TYPE}, + resourceTypes = {Oslc_cm_shapesDomainConstants.CHANGEREQUEST_TYPE}, usages = {} ) @GET @@ -1002,7 +1012,7 @@ public Response ChangeRequestSelector( uri = "resources/select_defect", hintWidth = "500px", hintHeight = "500px", - resourceTypes = {Oslc_cmDomainConstants.DEFECT_TYPE}, + resourceTypes = {Oslc_cm_shapesDomainConstants.DEFECT_TYPE}, usages = {} ) @GET @@ -1060,7 +1070,7 @@ public Response DefectSelector( uri = "resources/select_task", hintWidth = "500px", hintHeight = "500px", - resourceTypes = {Oslc_cmDomainConstants.TASK_TYPE}, + resourceTypes = {Oslc_cm_shapesDomainConstants.TASK_TYPE}, usages = {} ) @GET @@ -1118,7 +1128,7 @@ public Response TaskSelector( uri = "resources/select_review_task", hintWidth = "500px", hintHeight = "500px", - resourceTypes = {Oslc_cmDomainConstants.REVIEWTASK_TYPE}, + resourceTypes = {Oslc_cm_shapesDomainConstants.REVIEWTASK_TYPE}, usages = {} ) @GET @@ -1176,7 +1186,7 @@ public Response ReviewTaskSelector( uri = "resources/select_change_notice", hintWidth = "500px", hintHeight = "500px", - resourceTypes = {Oslc_cmDomainConstants.CHANGENOTICE_TYPE}, + resourceTypes = {Oslc_cm_shapesDomainConstants.CHANGENOTICE_TYPE}, usages = {} ) @GET @@ -1234,7 +1244,7 @@ public Response ChangeNoticeSelector( uri = "resources/select_enhancement", hintWidth = "500px", hintHeight = "500px", - resourceTypes = {Oslc_cmDomainConstants.ENHANCEMENT_TYPE}, + resourceTypes = {Oslc_cm_shapesDomainConstants.ENHANCEMENT_TYPE}, usages = {} ) @GET @@ -1295,8 +1305,8 @@ public Response EnhancementSelector( ( title = "ChangeRequestCF", label = "Change Request Creation Factory", - resourceShapes = {OslcConstants.PATH_RESOURCE_SHAPES + "/" + Oslc_cmDomainConstants.CHANGEREQUEST_PATH}, - resourceTypes = {Oslc_cmDomainConstants.CHANGEREQUEST_TYPE}, + resourceShapes = {OslcConstants.PATH_RESOURCE_SHAPES + "/" + Oslc_cm_shapesDomainConstants.CHANGEREQUEST_PATH}, + resourceTypes = {Oslc_cm_shapesDomainConstants.CHANGEREQUEST_TYPE}, usages = {} ) @POST @@ -1304,9 +1314,9 @@ public Response EnhancementSelector( @Consumes({OslcMediaType.APPLICATION_RDF_XML, OslcMediaType.APPLICATION_JSON_LD, OslcMediaType.TEXT_TURTLE, OslcMediaType.APPLICATION_XML, OslcMediaType.APPLICATION_JSON }) @Produces({OslcMediaType.APPLICATION_RDF_XML, OslcMediaType.APPLICATION_JSON_LD, OslcMediaType.TEXT_TURTLE, OslcMediaType.APPLICATION_XML, OslcMediaType.APPLICATION_JSON}) @Operation( - summary = "Creation factory for resources of type {" + Oslc_cmDomainConstants.CHANGEREQUEST_LOCALNAME + "}", - description = "Creation factory for resources of type {" + "" + Oslc_cmDomainConstants.CHANGEREQUEST_LOCALNAME + "" + "}" + - ", with respective resource shapes {" + "" + Oslc_cmDomainConstants.CHANGEREQUEST_LOCALNAME + "" + "}", + summary = "Creation factory for resources of type {" + Oslc_cm_shapesDomainConstants.CHANGEREQUEST_LOCALNAME + "}", + description = "Creation factory for resources of type {" + "" + Oslc_cm_shapesDomainConstants.CHANGEREQUEST_LOCALNAME + "" + "}" + + ", with respective resource shapes {" + "" + Oslc_cm_shapesDomainConstants.CHANGEREQUEST_LOCALNAME + "" + "}", responses = { @ApiResponse(description = "default response", content = {@Content(mediaType = OslcMediaType.APPLICATION_RDF_XML), @Content(mediaType = OslcMediaType.APPLICATION_XML), @Content(mediaType = OslcMediaType.APPLICATION_JSON), @Content(mediaType = OslcMediaType.TEXT_TURTLE)}) } @@ -1356,7 +1366,7 @@ public Response DefectCreator( uri = "resources/create_defect", hintWidth = "500px", hintHeight = "500px", - resourceTypes = {Oslc_cmDomainConstants.DEFECT_TYPE}, + resourceTypes = {Oslc_cm_shapesDomainConstants.DEFECT_TYPE}, usages = {} ) @POST @@ -1605,6 +1615,60 @@ public void createDefectFromDialog(MultivaluedMap formParams aResource.addAuthorizer(new Link(new URI(paramValues.get(i)))); } } + paramValues = formParams.get("type"); + if (paramValues != null) { + for(int i=0; i formParams aResource.addAuthorizer(new Link(new URI(paramValues.get(i)))); } } + paramValues = formParams.get("type"); + if (paramValues != null) { + for(int i=0; i formParams aResource.addAuthorizer(new Link(new URI(paramValues.get(i)))); } } + paramValues = formParams.get("type"); + if (paramValues != null) { + for(int i=0; i formPara aResource.addAuthorizer(new Link(new URI(paramValues.get(i)))); } } + paramValues = formParams.get("type"); + if (paramValues != null) { + for(int i=0; i formParam aResource.addAuthorizer(new Link(new URI(paramValues.get(i)))); } } + paramValues = formParams.get("type"); + if (paramValues != null) { + for(int i=0; i" + Oslc_cmDomainConstants.CHANGEREQUEST_LOCALNAME + "" + "'}" + - ", with respective resource shapes {'" + "" + Oslc_cmDomainConstants.CHANGEREQUEST_LOCALNAME + "" + "'}", + summary = "GET for resources of type {'" + Oslc_cm_shapesDomainConstants.CHANGEREQUEST_LOCALNAME + "'}", + description = "GET for resources of type {'" + "" + Oslc_cm_shapesDomainConstants.CHANGEREQUEST_LOCALNAME + "" + "'}" + + ", with respective resource shapes {'" + "" + Oslc_cm_shapesDomainConstants.CHANGEREQUEST_LOCALNAME + "" + "'}", responses = {@ApiResponse(description = "default response", content = {@Content(mediaType = OslcMediaType.APPLICATION_RDF_XML), @Content( mediaType = OslcMediaType.APPLICATION_XML), @Content( @@ -158,9 +158,9 @@ public ChangeRequest getChangeRequest( @Path("{id}") @Produces({ MediaType.TEXT_HTML }) @Operation( - summary = "GET for resources of type {'" + Oslc_cmDomainConstants.CHANGEREQUEST_LOCALNAME + "'}", - description = "GET for resources of type {'" + "" + Oslc_cmDomainConstants.CHANGEREQUEST_LOCALNAME + "" + "'}" + - ", with respective resource shapes {'" + "" + Oslc_cmDomainConstants.CHANGEREQUEST_LOCALNAME + "" + "'}", + summary = "GET for resources of type {'" + Oslc_cm_shapesDomainConstants.CHANGEREQUEST_LOCALNAME + "'}", + description = "GET for resources of type {'" + "" + Oslc_cm_shapesDomainConstants.CHANGEREQUEST_LOCALNAME + "" + "'}" + + ", with respective resource shapes {'" + "" + Oslc_cm_shapesDomainConstants.CHANGEREQUEST_LOCALNAME + "" + "'}", responses = {@ApiResponse(description = "default response", content = {@Content(mediaType = OslcMediaType.APPLICATION_RDF_XML), @Content( mediaType = OslcMediaType.APPLICATION_XML), @Content( @@ -185,8 +185,8 @@ public void getChangeRequestAsHtml( // End of user code httpServletRequest.setAttribute("aResource", aChangeRequest); - httpServletRequest.setAttribute("resourceTypeName", Oslc_cmDomainConstants.CHANGEREQUEST_LOCALNAME); - httpServletRequest.setAttribute("shapeUri", UriBuilder.fromUri(OSLC4JUtils.getServletURI()).path(OslcConstants.PATH_RESOURCE_SHAPES).path(Oslc_cmDomainConstants.CHANGEREQUEST_PATH).build()); + httpServletRequest.setAttribute("resourceTypeName", Oslc_cm_shapesDomainConstants.CHANGEREQUEST_LOCALNAME); + httpServletRequest.setAttribute("shapeUri", UriBuilder.fromUri(OSLC4JUtils.getServletURI()).path(OslcConstants.PATH_RESOURCE_SHAPES).path(Oslc_cm_shapesDomainConstants.CHANGEREQUEST_PATH).build()); RequestDispatcher rd = httpServletRequest.getRequestDispatcher("/co/oslc/refimpl/cm/gen/viewresource.jsp"); rd.forward(httpServletRequest,httpServletResponse); return; @@ -199,9 +199,9 @@ public void getChangeRequestAsHtml( @Path("{id}") @Produces({OslcMediaType.APPLICATION_X_OSLC_COMPACT_XML}) @Operation( - summary = "GET for resources of type {'" + Oslc_cmDomainConstants.CHANGEREQUEST_LOCALNAME + "'}", - description = "GET for resources of type {'" + "" + Oslc_cmDomainConstants.CHANGEREQUEST_LOCALNAME + "" + "'}" + - ", with respective resource shapes {'" + "" + Oslc_cmDomainConstants.CHANGEREQUEST_LOCALNAME + "" + "'}", + summary = "GET for resources of type {'" + Oslc_cm_shapesDomainConstants.CHANGEREQUEST_LOCALNAME + "'}", + description = "GET for resources of type {'" + "" + Oslc_cm_shapesDomainConstants.CHANGEREQUEST_LOCALNAME + "" + "'}" + + ", with respective resource shapes {'" + "" + Oslc_cm_shapesDomainConstants.CHANGEREQUEST_LOCALNAME + "" + "'}", responses = {@ApiResponse(description = "default response", content = {@Content(mediaType = OslcMediaType.APPLICATION_RDF_XML), @Content( mediaType = OslcMediaType.APPLICATION_XML), @Content( @@ -273,7 +273,7 @@ public void getChangeRequestAsHtmlSmallPreview( try { httpServletRequest.setAttribute("resourceTitle", aChangeRequest.toString()); - ArrayList getterMethodNames = new ArrayList(Arrays.asList("getShortTitle", "getDescription", "getTitle", "getIdentifier", "getSubject", "getCreator", "getContributor", "getCreated", "getModified", "getServiceProvider", "getInstanceShape", "getDiscussedBy", "getCloseDate", "getStatus", "isClosed", "isInProgress", "isFixed", "isApproved", "isReviewed", "isVerified", "getRelatedChangeRequest", "getAffectsPlanItem", "getAffectedByDefect", "getTracksRequirement", "getImplementsRequirement", "getAffectsRequirement", "getTracksChangeSet", "getParent", "getPriority", "getState", "getAuthorizer")); + ArrayList getterMethodNames = new ArrayList(Arrays.asList("getShortTitle", "getDescription", "getTitle", "getIdentifier", "getSubject", "getCreator", "getContributor", "getCreated", "getModified", "getServiceProvider", "getInstanceShape", "getDiscussedBy", "getCloseDate", "getStatus", "isClosed", "isInProgress", "isFixed", "isApproved", "isReviewed", "isVerified", "getRelatedChangeRequest", "getAffectsPlanItem", "getAffectedByDefect", "getTracksRequirement", "getImplementsRequirement", "getAffectsRequirement", "getTracksChangeSet", "getParent", "getPriority", "getState", "getAuthorizer", "getType", "getTestedByTestCase", "getAffectsTestResult", "getBlocksTestExecutionRecord", "getRelatedTestExecutionRecord", "getRelatedTestCase", "getRelatedTestPlan", "getRelatedTestScript", "getSeverity")); // Start of user code getChangeRequestAsHtmlSmallPreview_setResourceGetterMethods //TODO: modify the set of attributes to show in the preview // End of user code @@ -311,7 +311,7 @@ public void getChangeRequestAsHtmlLargePreview( try { httpServletRequest.setAttribute("resourceTitle", aChangeRequest.toString()); - ArrayList getterMethodNames = new ArrayList(Arrays.asList("getShortTitle", "getDescription", "getTitle", "getIdentifier", "getSubject", "getCreator", "getContributor", "getCreated", "getModified", "getServiceProvider", "getInstanceShape", "getDiscussedBy", "getCloseDate", "getStatus", "isClosed", "isInProgress", "isFixed", "isApproved", "isReviewed", "isVerified", "getRelatedChangeRequest", "getAffectsPlanItem", "getAffectedByDefect", "getTracksRequirement", "getImplementsRequirement", "getAffectsRequirement", "getTracksChangeSet", "getParent", "getPriority", "getState", "getAuthorizer")); + ArrayList getterMethodNames = new ArrayList(Arrays.asList("getShortTitle", "getDescription", "getTitle", "getIdentifier", "getSubject", "getCreator", "getContributor", "getCreated", "getModified", "getServiceProvider", "getInstanceShape", "getDiscussedBy", "getCloseDate", "getStatus", "isClosed", "isInProgress", "isFixed", "isApproved", "isReviewed", "isVerified", "getRelatedChangeRequest", "getAffectsPlanItem", "getAffectedByDefect", "getTracksRequirement", "getImplementsRequirement", "getAffectsRequirement", "getTracksChangeSet", "getParent", "getPriority", "getState", "getAuthorizer", "getType", "getTestedByTestCase", "getAffectsTestResult", "getBlocksTestExecutionRecord", "getRelatedTestExecutionRecord", "getRelatedTestCase", "getRelatedTestPlan", "getRelatedTestScript", "getSeverity")); // Start of user code getChangeRequestAsHtmlLargePreview_setResourceGetterMethods //TODO: modify the set of attributes to show in the preview // End of user code @@ -332,9 +332,9 @@ public void getChangeRequestAsHtmlLargePreview( @DELETE @Path("{id}") @Operation( - summary = "DELETE for resources of type {'" + Oslc_cmDomainConstants.CHANGEREQUEST_LOCALNAME + "'}", - description = "DELETE for resources of type {'" + "" + Oslc_cmDomainConstants.CHANGEREQUEST_LOCALNAME + "" + "'}" + - ", with respective resource shapes {'" + "" + Oslc_cmDomainConstants.CHANGEREQUEST_LOCALNAME + "" + "'}", + summary = "DELETE for resources of type {'" + Oslc_cm_shapesDomainConstants.CHANGEREQUEST_LOCALNAME + "'}", + description = "DELETE for resources of type {'" + "" + Oslc_cm_shapesDomainConstants.CHANGEREQUEST_LOCALNAME + "" + "'}" + + ", with respective resource shapes {'" + "" + Oslc_cm_shapesDomainConstants.CHANGEREQUEST_LOCALNAME + "" + "'}", responses = {@ApiResponse(description = "default response", content = {@Content(mediaType = OslcMediaType.APPLICATION_RDF_XML), @Content( mediaType = OslcMediaType.APPLICATION_XML), @Content( @@ -368,9 +368,9 @@ public Response deleteChangeRequest( @Path("{id}") @Consumes({OslcMediaType.APPLICATION_RDF_XML, OslcMediaType.APPLICATION_JSON_LD, OslcMediaType.TEXT_TURTLE, OslcMediaType.APPLICATION_XML, OslcMediaType.APPLICATION_JSON }) @Operation( - summary = "PUT for resources of type {'" + Oslc_cmDomainConstants.CHANGEREQUEST_LOCALNAME + "'}", - description = "PUT for resources of type {'" + "" + Oslc_cmDomainConstants.CHANGEREQUEST_LOCALNAME + "" + "'}" + - ", with respective resource shapes {'" + "" + Oslc_cmDomainConstants.CHANGEREQUEST_LOCALNAME + "" + "'}", + summary = "PUT for resources of type {'" + Oslc_cm_shapesDomainConstants.CHANGEREQUEST_LOCALNAME + "'}", + description = "PUT for resources of type {'" + "" + Oslc_cm_shapesDomainConstants.CHANGEREQUEST_LOCALNAME + "" + "'}" + + ", with respective resource shapes {'" + "" + Oslc_cm_shapesDomainConstants.CHANGEREQUEST_LOCALNAME + "" + "'}", responses = {@ApiResponse(description = "default response", content = {@Content(mediaType = OslcMediaType.APPLICATION_RDF_XML), @Content( mediaType = OslcMediaType.APPLICATION_XML), @Content( diff --git a/src/server-cm/src/main/java/co/oslc/refimpl/cm/gen/servlet/Application.java b/src/server-cm/src/main/java/co/oslc/refimpl/cm/gen/servlet/Application.java index 0e8f3a75..3c77bb5b 100644 --- a/src/server-cm/src/main/java/co/oslc/refimpl/cm/gen/servlet/Application.java +++ b/src/server-cm/src/main/java/co/oslc/refimpl/cm/gen/servlet/Application.java @@ -68,6 +68,7 @@ import co.oslc.refimpl.cm.gen.services.ResourceShapeService; import org.eclipse.lyo.oslc.domains.Agent; +import org.eclipse.lyo.oslc4j.core.model.AllowedValues; import org.eclipse.lyo.oslc.domains.cm.ChangeNotice; import org.eclipse.lyo.oslc.domains.cm.ChangeRequest; import org.eclipse.lyo.oslc.domains.config.ChangeSet; @@ -76,18 +77,27 @@ import org.eclipse.lyo.oslc.domains.config.ConceptResource; import org.eclipse.lyo.oslc.domains.config.Configuration; import org.eclipse.lyo.oslc.domains.config.Contribution; +import org.eclipse.lyo.oslc4j.core.model.CreationFactory; import org.eclipse.lyo.oslc.domains.cm.Defect; +import org.eclipse.lyo.oslc4j.core.model.Dialog; import org.eclipse.lyo.oslc4j.core.model.Discussion; import org.eclipse.lyo.oslc.domains.cm.Enhancement; import org.eclipse.lyo.oslc.domains.Person; import org.eclipse.lyo.oslc.domains.cm.Priority; +import org.eclipse.lyo.oslc4j.core.model.Property; +import org.eclipse.lyo.oslc4j.core.model.Publisher; +import org.eclipse.lyo.oslc4j.core.model.QueryCapability; import org.eclipse.lyo.oslc.domains.rm.Requirement; +import org.eclipse.lyo.oslc4j.core.model.ResourceShape; import org.eclipse.lyo.oslc.domains.cm.ReviewTask; import org.eclipse.lyo.oslc.domains.config.Selections; +import org.eclipse.lyo.oslc4j.core.model.Service; +import org.eclipse.lyo.oslc4j.core.model.ServiceProvider; +import org.eclipse.lyo.oslc.domains.cm.Severity; import org.eclipse.lyo.oslc.domains.cm.State; import org.eclipse.lyo.oslc.domains.cm.Task; import org.eclipse.lyo.oslc.domains.config.VersionResource; -import org.eclipse.lyo.oslc.domains.cm.Oslc_cmDomainConstants; +import org.eclipse.lyo.oslc.domains.cm.Oslc_cm_shapesDomainConstants; import org.eclipse.lyo.oslc.domains.config.Oslc_configDomainConstants; import org.eclipse.lyo.oslc.domains.DctermsDomainConstants; import org.eclipse.lyo.oslc.domains.FoafDomainConstants; @@ -105,7 +115,7 @@ // End of user code /** - * Generated by Lyo Designer 7.0.0.qualifier + * Generated by Lyo Designer 7.0.0.202511282003 */ @OpenAPIDefinition(info = @Info(title = "CM", version = "1.0.0"), servers = @Server(url = "/services/")) @@ -178,24 +188,34 @@ public Set getSingletons() { RESOURCE_SHAPE_PATH_TO_RESOURCE_CLASS_MAP.put(OslcConstants.PATH_SERVICE_PROVIDER_CATALOG, ServiceProviderCatalog.class); RESOURCE_SHAPE_PATH_TO_RESOURCE_CLASS_MAP.put(FoafDomainConstants.AGENT_PATH, Agent.class); - RESOURCE_SHAPE_PATH_TO_RESOURCE_CLASS_MAP.put(Oslc_cmDomainConstants.CHANGENOTICE_PATH, ChangeNotice.class); - RESOURCE_SHAPE_PATH_TO_RESOURCE_CLASS_MAP.put(Oslc_cmDomainConstants.CHANGEREQUEST_PATH, ChangeRequest.class); + RESOURCE_SHAPE_PATH_TO_RESOURCE_CLASS_MAP.put(OslcDomainConstants.ALLOWEDVALUES_PATH, AllowedValues.class); + RESOURCE_SHAPE_PATH_TO_RESOURCE_CLASS_MAP.put(Oslc_cm_shapesDomainConstants.CHANGENOTICE_PATH, ChangeNotice.class); + RESOURCE_SHAPE_PATH_TO_RESOURCE_CLASS_MAP.put(Oslc_cm_shapesDomainConstants.CHANGEREQUEST_PATH, ChangeRequest.class); RESOURCE_SHAPE_PATH_TO_RESOURCE_CLASS_MAP.put(Oslc_configDomainConstants.CHANGESET_PATH, ChangeSet.class); RESOURCE_SHAPE_PATH_TO_RESOURCE_CLASS_MAP.put(RdfsDomainConstants.CLASS_PATH, RdfsClass.class); RESOURCE_SHAPE_PATH_TO_RESOURCE_CLASS_MAP.put(Oslc_configDomainConstants.COMPONENT_PATH, Component.class); RESOURCE_SHAPE_PATH_TO_RESOURCE_CLASS_MAP.put(Oslc_configDomainConstants.CONCEPTRESOURCE_PATH, ConceptResource.class); RESOURCE_SHAPE_PATH_TO_RESOURCE_CLASS_MAP.put(Oslc_configDomainConstants.CONFIGURATION_PATH, Configuration.class); RESOURCE_SHAPE_PATH_TO_RESOURCE_CLASS_MAP.put(Oslc_configDomainConstants.CONTRIBUTION_PATH, Contribution.class); - RESOURCE_SHAPE_PATH_TO_RESOURCE_CLASS_MAP.put(Oslc_cmDomainConstants.DEFECT_PATH, Defect.class); + RESOURCE_SHAPE_PATH_TO_RESOURCE_CLASS_MAP.put(OslcDomainConstants.CREATIONFACTORY_PATH, CreationFactory.class); + RESOURCE_SHAPE_PATH_TO_RESOURCE_CLASS_MAP.put(Oslc_cm_shapesDomainConstants.DEFECT_PATH, Defect.class); + RESOURCE_SHAPE_PATH_TO_RESOURCE_CLASS_MAP.put(OslcDomainConstants.DIALOG_PATH, Dialog.class); RESOURCE_SHAPE_PATH_TO_RESOURCE_CLASS_MAP.put(OslcDomainConstants.DISCUSSION_PATH, Discussion.class); - RESOURCE_SHAPE_PATH_TO_RESOURCE_CLASS_MAP.put(Oslc_cmDomainConstants.ENHANCEMENT_PATH, Enhancement.class); + RESOURCE_SHAPE_PATH_TO_RESOURCE_CLASS_MAP.put(Oslc_cm_shapesDomainConstants.ENHANCEMENT_PATH, Enhancement.class); RESOURCE_SHAPE_PATH_TO_RESOURCE_CLASS_MAP.put(FoafDomainConstants.PERSON_PATH, Person.class); - RESOURCE_SHAPE_PATH_TO_RESOURCE_CLASS_MAP.put(Oslc_cmDomainConstants.PRIORITY_PATH, Priority.class); + RESOURCE_SHAPE_PATH_TO_RESOURCE_CLASS_MAP.put(Oslc_cm_shapesDomainConstants.PRIORITY_PATH, Priority.class); + RESOURCE_SHAPE_PATH_TO_RESOURCE_CLASS_MAP.put(OslcDomainConstants.PROPERTY_PATH, Property.class); + RESOURCE_SHAPE_PATH_TO_RESOURCE_CLASS_MAP.put(OslcDomainConstants.PUBLISHER_PATH, Publisher.class); + RESOURCE_SHAPE_PATH_TO_RESOURCE_CLASS_MAP.put(OslcDomainConstants.QUERYCAPABILITY_PATH, QueryCapability.class); RESOURCE_SHAPE_PATH_TO_RESOURCE_CLASS_MAP.put(Oslc_rmDomainConstants.REQUIREMENT_PATH, Requirement.class); - RESOURCE_SHAPE_PATH_TO_RESOURCE_CLASS_MAP.put(Oslc_cmDomainConstants.REVIEWTASK_PATH, ReviewTask.class); + RESOURCE_SHAPE_PATH_TO_RESOURCE_CLASS_MAP.put(OslcDomainConstants.RESOURCESHAPE_PATH, ResourceShape.class); + RESOURCE_SHAPE_PATH_TO_RESOURCE_CLASS_MAP.put(Oslc_cm_shapesDomainConstants.REVIEWTASK_PATH, ReviewTask.class); RESOURCE_SHAPE_PATH_TO_RESOURCE_CLASS_MAP.put(Oslc_configDomainConstants.SELECTIONS_PATH, Selections.class); - RESOURCE_SHAPE_PATH_TO_RESOURCE_CLASS_MAP.put(Oslc_cmDomainConstants.STATE_PATH, State.class); - RESOURCE_SHAPE_PATH_TO_RESOURCE_CLASS_MAP.put(Oslc_cmDomainConstants.TASK_PATH, Task.class); + RESOURCE_SHAPE_PATH_TO_RESOURCE_CLASS_MAP.put(OslcDomainConstants.SERVICE_PATH, Service.class); + RESOURCE_SHAPE_PATH_TO_RESOURCE_CLASS_MAP.put(OslcDomainConstants.SERVICEPROVIDER_PATH, ServiceProvider.class); + RESOURCE_SHAPE_PATH_TO_RESOURCE_CLASS_MAP.put(Oslc_cm_shapesDomainConstants.SEVERITY_PATH, Severity.class); + RESOURCE_SHAPE_PATH_TO_RESOURCE_CLASS_MAP.put(Oslc_cm_shapesDomainConstants.STATE_PATH, State.class); + RESOURCE_SHAPE_PATH_TO_RESOURCE_CLASS_MAP.put(Oslc_cm_shapesDomainConstants.TASK_PATH, Task.class); RESOURCE_SHAPE_PATH_TO_RESOURCE_CLASS_MAP.put(Oslc_configDomainConstants.VERSIONRESOURCE_PATH, VersionResource.class); } diff --git a/src/server-cm/src/main/java/co/oslc/refimpl/cm/gen/servlet/ServiceProvidersFactory.java b/src/server-cm/src/main/java/co/oslc/refimpl/cm/gen/servlet/ServiceProvidersFactory.java index f42a2f94..aad0ac50 100644 --- a/src/server-cm/src/main/java/co/oslc/refimpl/cm/gen/servlet/ServiceProvidersFactory.java +++ b/src/server-cm/src/main/java/co/oslc/refimpl/cm/gen/servlet/ServiceProvidersFactory.java @@ -23,134 +23,134 @@ * * This file is generated by org.eclipse.lyo.oslc4j.codegenerator *******************************************************************************/ -// End of user code - -package co.oslc.refimpl.cm.gen.servlet; - -// spotless:off -import java.net.URI; -import java.net.URISyntaxException; -import java.util.Date; -import java.util.HashMap; -import java.util.Map; - -import jakarta.ws.rs.core.UriBuilder; - -import org.eclipse.lyo.oslc4j.core.exception.OslcCoreApplicationException; -import org.eclipse.lyo.oslc4j.core.model.OslcConstants; -import org.eclipse.lyo.oslc4j.core.model.PrefixDefinition; -import org.eclipse.lyo.oslc4j.core.model.Publisher; -import org.eclipse.lyo.oslc4j.core.model.ServiceProvider; -import org.eclipse.lyo.oslc4j.core.model.ServiceProviderFactory; -import org.eclipse.lyo.oslc4j.core.OSLC4JUtils; - -import co.oslc.refimpl.cm.gen.ServiceProviderInfo; - -import org.eclipse.lyo.oslc.domains.cm.Oslc_cmDomainConstants; -import org.eclipse.lyo.oslc.domains.config.Oslc_configDomainConstants; -import org.eclipse.lyo.oslc.domains.DctermsDomainConstants; -import org.eclipse.lyo.oslc.domains.FoafDomainConstants; -import org.eclipse.lyo.oslc4j.core.model.OslcDomainConstants; -import org.eclipse.lyo.oslc.domains.RdfsDomainConstants; -import org.eclipse.lyo.oslc.domains.rm.Oslc_rmDomainConstants; -import co.oslc.refimpl.cm.gen.services.Change_requestsService; - +// End of user code + +package co.oslc.refimpl.cm.gen.servlet; + +// spotless:off +import java.net.URI; +import java.net.URISyntaxException; +import java.util.Date; +import java.util.HashMap; +import java.util.Map; + +import jakarta.ws.rs.core.UriBuilder; + +import org.eclipse.lyo.oslc4j.core.exception.OslcCoreApplicationException; +import org.eclipse.lyo.oslc4j.core.model.OslcConstants; +import org.eclipse.lyo.oslc4j.core.model.PrefixDefinition; +import org.eclipse.lyo.oslc4j.core.model.Publisher; +import org.eclipse.lyo.oslc4j.core.model.ServiceProvider; +import org.eclipse.lyo.oslc4j.core.model.ServiceProviderFactory; +import org.eclipse.lyo.oslc4j.core.OSLC4JUtils; + +import co.oslc.refimpl.cm.gen.ServiceProviderInfo; + +import org.eclipse.lyo.oslc.domains.cm.Oslc_cm_shapesDomainConstants; +import org.eclipse.lyo.oslc.domains.config.Oslc_configDomainConstants; +import org.eclipse.lyo.oslc.domains.DctermsDomainConstants; +import org.eclipse.lyo.oslc.domains.FoafDomainConstants; +import org.eclipse.lyo.oslc4j.core.model.OslcDomainConstants; +import org.eclipse.lyo.oslc.domains.RdfsDomainConstants; +import org.eclipse.lyo.oslc.domains.rm.Oslc_rmDomainConstants; +import co.oslc.refimpl.cm.gen.services.Change_requestsService; + // Start of user code imports -// End of user code -// spotless:on - -public class ServiceProvidersFactory -{ - private static Class[] RESOURCE_CLASSES = - { - Change_requestsService.class - }; - - private ServiceProvidersFactory() - { - super(); - } - - public static URI constructURI(final String serviceProviderId) - { - String basePath = OSLC4JUtils.getServletURI(); - Map pathParameters = new HashMap(); - pathParameters.put("serviceProviderId", serviceProviderId); - String instanceURI = "serviceProviders/{serviceProviderId}"; - - final UriBuilder builder = UriBuilder.fromUri(basePath); - return builder.path(instanceURI).buildFromMap(pathParameters); - } - - public static URI constructURI(final ServiceProviderInfo serviceProviderInfo) - { - return constructURI(serviceProviderInfo.serviceProviderId); - } - - public static String constructIdentifier(final String serviceProviderId) - { - return serviceProviderId; - } - - public static String constructIdentifier(final ServiceProviderInfo serviceProviderInfo) - { - return constructIdentifier(serviceProviderInfo.serviceProviderId); - } - - public static ServiceProvider createServiceProvider(final ServiceProviderInfo serviceProviderInfo) - throws OslcCoreApplicationException, URISyntaxException, IllegalArgumentException { +// End of user code +// spotless:on + +public class ServiceProvidersFactory +{ + private static Class[] RESOURCE_CLASSES = + { + Change_requestsService.class + }; + + private ServiceProvidersFactory() + { + super(); + } + + public static URI constructURI(final String serviceProviderId) + { + String basePath = OSLC4JUtils.getServletURI(); + Map pathParameters = new HashMap(); + pathParameters.put("serviceProviderId", serviceProviderId); + String instanceURI = "serviceProviders/{serviceProviderId}"; + + final UriBuilder builder = UriBuilder.fromUri(basePath); + return builder.path(instanceURI).buildFromMap(pathParameters); + } + + public static URI constructURI(final ServiceProviderInfo serviceProviderInfo) + { + return constructURI(serviceProviderInfo.serviceProviderId); + } + + public static String constructIdentifier(final String serviceProviderId) + { + return serviceProviderId; + } + + public static String constructIdentifier(final ServiceProviderInfo serviceProviderInfo) + { + return constructIdentifier(serviceProviderInfo.serviceProviderId); + } + + public static ServiceProvider createServiceProvider(final ServiceProviderInfo serviceProviderInfo) + throws OslcCoreApplicationException, URISyntaxException, IllegalArgumentException { // Start of user code init - // End of user code - URI serviceProviderURI = constructURI(serviceProviderInfo); - String identifier = constructIdentifier(serviceProviderInfo); - String basePath = OSLC4JUtils.getServletURI(); - String title = serviceProviderInfo.name; - String description = String.format("%s (id: %s; kind: %s)", - "Service Provider", - identifier, - "Service Provider"); - Publisher publisher = null; - Map parameterMap = new HashMap(); - parameterMap.put("serviceProviderId", serviceProviderInfo.serviceProviderId); - - ServiceProvider serviceProvider = ServiceProviderFactory.createServiceProvider(basePath, - "", - title, - description, - publisher, - RESOURCE_CLASSES, - parameterMap); - - final PrefixDefinition[] prefixDefinitions = - { - new PrefixDefinition(OslcConstants.DCTERMS_NAMESPACE_PREFIX, new URI(OslcConstants.DCTERMS_NAMESPACE)), - new PrefixDefinition(OslcConstants.OSLC_CORE_NAMESPACE_PREFIX, new URI(OslcConstants.OSLC_CORE_NAMESPACE)), - new PrefixDefinition(OslcConstants.OSLC_DATA_NAMESPACE_PREFIX, new URI(OslcConstants.OSLC_DATA_NAMESPACE)), - new PrefixDefinition(OslcConstants.RDF_NAMESPACE_PREFIX, new URI(OslcConstants.RDF_NAMESPACE)), - new PrefixDefinition(OslcConstants.RDFS_NAMESPACE_PREFIX, new URI(OslcConstants.RDFS_NAMESPACE)), - new PrefixDefinition(Oslc_cmDomainConstants.CHANGE_MANAGEMENT_SHAPES_NAMSPACE_PREFIX, new URI(Oslc_cmDomainConstants.CHANGE_MANAGEMENT_SHAPES_NAMSPACE)) + // End of user code + URI serviceProviderURI = constructURI(serviceProviderInfo); + String identifier = constructIdentifier(serviceProviderInfo); + String basePath = OSLC4JUtils.getServletURI(); + String title = serviceProviderInfo.name; + String description = String.format("%s (id: %s; kind: %s)", + "Service Provider", + identifier, + "Service Provider"); + Publisher publisher = null; + Map parameterMap = new HashMap(); + parameterMap.put("serviceProviderId", serviceProviderInfo.serviceProviderId); + + ServiceProvider serviceProvider = ServiceProviderFactory.createServiceProvider(basePath, + "", + title, + description, + publisher, + RESOURCE_CLASSES, + parameterMap); + + final PrefixDefinition[] prefixDefinitions = + { + new PrefixDefinition(OslcConstants.DCTERMS_NAMESPACE_PREFIX, new URI(OslcConstants.DCTERMS_NAMESPACE)), + new PrefixDefinition(OslcConstants.OSLC_CORE_NAMESPACE_PREFIX, new URI(OslcConstants.OSLC_CORE_NAMESPACE)), + new PrefixDefinition(OslcConstants.OSLC_DATA_NAMESPACE_PREFIX, new URI(OslcConstants.OSLC_DATA_NAMESPACE)), + new PrefixDefinition(OslcConstants.RDF_NAMESPACE_PREFIX, new URI(OslcConstants.RDF_NAMESPACE)), + new PrefixDefinition(OslcConstants.RDFS_NAMESPACE_PREFIX, new URI(OslcConstants.RDFS_NAMESPACE)), + new PrefixDefinition(Oslc_cm_shapesDomainConstants.CHANGE_MANAGEMENT_SHAPES_NAMSPACE_PREFIX, new URI(Oslc_cm_shapesDomainConstants.CHANGE_MANAGEMENT_SHAPES_NAMSPACE)) , - new PrefixDefinition(Oslc_configDomainConstants.CONFIGURATION_MANAGEMENT_NAMSPACE_PREFIX, new URI(Oslc_configDomainConstants.CONFIGURATION_MANAGEMENT_NAMSPACE)) + new PrefixDefinition(Oslc_configDomainConstants.CONFIGURATION_MANAGEMENT_NAMSPACE_PREFIX, new URI(Oslc_configDomainConstants.CONFIGURATION_MANAGEMENT_NAMSPACE)) , - new PrefixDefinition(DctermsDomainConstants.DUBLIN_CORE_NAMSPACE_PREFIX, new URI(DctermsDomainConstants.DUBLIN_CORE_NAMSPACE)) + new PrefixDefinition(DctermsDomainConstants.DUBLIN_CORE_NAMSPACE_PREFIX, new URI(DctermsDomainConstants.DUBLIN_CORE_NAMSPACE)) , - new PrefixDefinition(FoafDomainConstants.FOAF_NAMSPACE_PREFIX, new URI(FoafDomainConstants.FOAF_NAMSPACE)) + new PrefixDefinition(FoafDomainConstants.FOAF_NAMSPACE_PREFIX, new URI(FoafDomainConstants.FOAF_NAMSPACE)) , - new PrefixDefinition(OslcDomainConstants.OSLC_NAMSPACE_PREFIX, new URI(OslcDomainConstants.OSLC_NAMSPACE)) + new PrefixDefinition(OslcDomainConstants.OSLC_NAMSPACE_PREFIX, new URI(OslcDomainConstants.OSLC_NAMSPACE)) , - new PrefixDefinition(RdfsDomainConstants.RDFS_NAMSPACE_PREFIX, new URI(RdfsDomainConstants.RDFS_NAMSPACE)) + new PrefixDefinition(RdfsDomainConstants.RDFS_NAMSPACE_PREFIX, new URI(RdfsDomainConstants.RDFS_NAMSPACE)) , - new PrefixDefinition(Oslc_rmDomainConstants.REQUIREMENTS_MANAGEMENT_SHAPES_NAMSPACE_PREFIX, new URI(Oslc_rmDomainConstants.REQUIREMENTS_MANAGEMENT_SHAPES_NAMSPACE)) - }; - serviceProvider.setPrefixDefinitions(prefixDefinitions); - - serviceProvider.setAbout(serviceProviderURI); - serviceProvider.setIdentifier(identifier); - serviceProvider.setCreated(new Date()); - serviceProvider.setDetails(new URI[] {serviceProviderURI}); - + new PrefixDefinition(Oslc_rmDomainConstants.REQUIREMENTS_MANAGEMENT_SHAPES_NAMSPACE_PREFIX, new URI(Oslc_rmDomainConstants.REQUIREMENTS_MANAGEMENT_SHAPES_NAMSPACE)) + }; + serviceProvider.setPrefixDefinitions(prefixDefinitions); + + serviceProvider.setAbout(serviceProviderURI); + serviceProvider.setIdentifier(identifier); + serviceProvider.setCreated(new Date()); + serviceProvider.setDetails(new URI[] {serviceProviderURI}); + // Start of user code finalize - // End of user code - return serviceProvider; - } -} + // End of user code + return serviceProvider; + } +} diff --git a/src/server-cm/src/main/webapp/co/oslc/refimpl/cm/gen/changenoticecreator.jsp b/src/server-cm/src/main/webapp/co/oslc/refimpl/cm/gen/changenoticecreator.jsp index 55d6daf5..5e277c22 100644 --- a/src/server-cm/src/main/webapp/co/oslc/refimpl/cm/gen/changenoticecreator.jsp +++ b/src/server-cm/src/main/webapp/co/oslc/refimpl/cm/gen/changenoticecreator.jsp @@ -272,6 +272,69 @@ %> + + + + <% + %> + + + + + + <% + %> + + + + + + <% + %> + + + + + + <% + %> + + + + + + <% + %> + + + + + + <% + %> + + + + + + <% + %> + + + + + + <% + %> + + + + + + <% + %> + + diff --git a/src/server-cm/src/main/webapp/co/oslc/refimpl/cm/gen/defectcreator.jsp b/src/server-cm/src/main/webapp/co/oslc/refimpl/cm/gen/defectcreator.jsp index 32334c5a..e4e10ecc 100644 --- a/src/server-cm/src/main/webapp/co/oslc/refimpl/cm/gen/defectcreator.jsp +++ b/src/server-cm/src/main/webapp/co/oslc/refimpl/cm/gen/defectcreator.jsp @@ -272,6 +272,69 @@ %> + + + + <% + %> + + + + + + <% + %> + + + + + + <% + %> + + + + + + <% + %> + + + + + + <% + %> + + + + + + <% + %> + + + + + + <% + %> + + + + + + <% + %> + + + + + + <% + %> + + diff --git a/src/server-cm/src/main/webapp/co/oslc/refimpl/cm/gen/enhancementcreator.jsp b/src/server-cm/src/main/webapp/co/oslc/refimpl/cm/gen/enhancementcreator.jsp index fa29e244..120bc944 100644 --- a/src/server-cm/src/main/webapp/co/oslc/refimpl/cm/gen/enhancementcreator.jsp +++ b/src/server-cm/src/main/webapp/co/oslc/refimpl/cm/gen/enhancementcreator.jsp @@ -272,6 +272,69 @@ %> + + + + <% + %> + + + + + + <% + %> + + + + + + <% + %> + + + + + + <% + %> + + + + + + <% + %> + + + + + + <% + %> + + + + + + <% + %> + + + + + + <% + %> + + + + + + <% + %> + + diff --git a/src/server-cm/src/main/webapp/co/oslc/refimpl/cm/gen/reviewtaskcreator.jsp b/src/server-cm/src/main/webapp/co/oslc/refimpl/cm/gen/reviewtaskcreator.jsp index 0fdf9f9c..01647382 100644 --- a/src/server-cm/src/main/webapp/co/oslc/refimpl/cm/gen/reviewtaskcreator.jsp +++ b/src/server-cm/src/main/webapp/co/oslc/refimpl/cm/gen/reviewtaskcreator.jsp @@ -272,6 +272,69 @@ %> + + + + <% + %> + + + + + + <% + %> + + + + + + <% + %> + + + + + + <% + %> + + + + + + <% + %> + + + + + + <% + %> + + + + + + <% + %> + + + + + + <% + %> + + + + + + <% + %> + + diff --git a/src/server-cm/src/main/webapp/co/oslc/refimpl/cm/gen/taskcreator.jsp b/src/server-cm/src/main/webapp/co/oslc/refimpl/cm/gen/taskcreator.jsp index feb4926c..644f8551 100644 --- a/src/server-cm/src/main/webapp/co/oslc/refimpl/cm/gen/taskcreator.jsp +++ b/src/server-cm/src/main/webapp/co/oslc/refimpl/cm/gen/taskcreator.jsp @@ -272,6 +272,69 @@ %> + + + + <% + %> + + + + + + <% + %> + + + + + + <% + %> + + + + + + <% + %> + + + + + + <% + %> + + + + + + <% + %> + + + + + + <% + %> + + + + + + <% + %> + + + + + + <% + %> + +