diff options
Diffstat (limited to 'plugins/org.eclipse.osee.framework.manager.servlet')
4 files changed, 10 insertions, 30 deletions
diff --git a/plugins/org.eclipse.osee.framework.manager.servlet/OSGI-INF/legacy.servlets.xml b/plugins/org.eclipse.osee.framework.manager.servlet/OSGI-INF/legacy.servlets.xml index 97aac56c0f8..2b9f306d243 100644 --- a/plugins/org.eclipse.osee.framework.manager.servlet/OSGI-INF/legacy.servlets.xml +++ b/plugins/org.eclipse.osee.framework.manager.servlet/OSGI-INF/legacy.servlets.xml @@ -13,6 +13,5 @@ <reference bind="setFactoryService" cardinality="1..1" interface="org.eclipse.osee.framework.core.services.IOseeModelFactoryService" name="IOseeModelFactoryService" policy="static"/> <reference bind="setResourceManager" cardinality="1..1" interface="org.eclipse.osee.framework.resource.management.IResourceManager" name="IResourceManager" policy="static"/> <reference bind="setOrcsApi" cardinality="1..1" interface="org.eclipse.osee.orcs.OrcsApi" name="OrcsApi" policy="static"/> - <reference bind="setIdentityService" cardinality="1..1" interface="org.eclipse.osee.framework.core.services.IdentityService" name="IdentityService" policy="static"/> </scr:component> diff --git a/plugins/org.eclipse.osee.framework.manager.servlet/src/org/eclipse/osee/framework/manager/servlet/OseeCacheServlet.java b/plugins/org.eclipse.osee.framework.manager.servlet/src/org/eclipse/osee/framework/manager/servlet/OseeCacheServlet.java index 0127e465ae1..2f483627dcf 100644 --- a/plugins/org.eclipse.osee.framework.manager.servlet/src/org/eclipse/osee/framework/manager/servlet/OseeCacheServlet.java +++ b/plugins/org.eclipse.osee.framework.manager.servlet/src/org/eclipse/osee/framework/manager/servlet/OseeCacheServlet.java @@ -49,7 +49,6 @@ import org.eclipse.osee.framework.core.model.cache.TransactionCache; import org.eclipse.osee.framework.core.model.type.AttributeType; import org.eclipse.osee.framework.core.server.UnsecuredOseeHttpServlet; import org.eclipse.osee.framework.core.services.IOseeModelFactoryService; -import org.eclipse.osee.framework.core.services.IdentityService; import org.eclipse.osee.framework.core.services.TempCachingService; import org.eclipse.osee.framework.core.translation.IDataTranslationService; import org.eclipse.osee.framework.core.translation.ITranslatorId; @@ -81,17 +80,15 @@ public class OseeCacheServlet extends UnsecuredOseeHttpServlet { private final BranchCache branchCache; private final TransactionCache txCache; private final OrcsApi orcsApi; - private final IdentityService identityService; private static final StorageState DEFAULT_STORAGE_STATE = StorageState.CREATED; - public OseeCacheServlet(Log logger, IDataTranslationService translationService, TempCachingService cachingService, OrcsApi orcsApi, IOseeModelFactoryService factoryService, IdentityService identityService) { + public OseeCacheServlet(Log logger, IDataTranslationService translationService, TempCachingService cachingService, OrcsApi orcsApi, IOseeModelFactoryService factoryService) { super(logger); this.translationService = translationService; this.branchCache = cachingService.getBranchCache(); this.txCache = cachingService.getTransactionCache(); this.orcsApi = orcsApi; this.factoryService = factoryService; - this.identityService = identityService; } public IDataTranslationService getTranslationService() { @@ -272,7 +269,7 @@ public class OseeCacheServlet extends UnsecuredOseeHttpServlet { List<Triplet<Long, String, Long>> artAttrs = new ArrayList<Triplet<Long, String, Long>>(); ArtifactTypes artTypes = orcsTypes.getArtifactTypes(); for (IArtifactType artType : artTypes.getAll()) { - long artTypeId = identityService.getLocalId(artType.getGuid()); + long artTypeId = artType.getGuid(); boolean isAbstract = artTypes.isAbstract(artType); rows.add(new ArtifactTypeRow(artTypeId, artType.getGuid(), artType.getName(), isAbstract, DEFAULT_STORAGE_STATE)); @@ -282,7 +279,7 @@ public class OseeCacheServlet extends UnsecuredOseeHttpServlet { Long[] intSuperTypes = new Long[superTypes.size()]; int index = 0; for (IArtifactType superType : superTypes) { - intSuperTypes[index++] = identityService.getLocalId(superType.getGuid()); + intSuperTypes[index++] = superType.getGuid(); } baseToSuper.put(artTypeId, intSuperTypes); } @@ -318,14 +315,13 @@ public class OseeCacheServlet extends UnsecuredOseeHttpServlet { new AttributeType(item.getGuid(), item.getName(), baseAttributeTypeId, attributeProviderNameId, fileTypeExtension, defaultValue, minOccurrances, maxOccurrences, description, taggerId, mediaType); - long localId = identityService.getLocalId(item); - type.setId(localId); + long typeId = item.getGuid(); + type.setId(typeId); rows.add(type); if (attrTypes.isEnumerated(item)) { EnumType enumType = attrTypes.getEnumType(item); - long enumId = identityService.getLocalId(enumType); - attrToEnum.put(localId, enumId); + attrToEnum.put(typeId, enumType.getGuid()); } } @@ -338,18 +334,14 @@ public class OseeCacheServlet extends UnsecuredOseeHttpServlet { for (IRelationType item : relTypes.getAll()) { IArtifactType sideAType = relTypes.getArtifactTypeSideA(item); IArtifactType sideBType = relTypes.getArtifactTypeSideB(item); - long artifactTypeSideA = identityService.getLocalId(sideAType); - long artifactTypeSideB = identityService.getLocalId(sideBType); - - long localId = identityService.getLocalId(item); String sideAName = relTypes.getSideAName(item); String sideBName = relTypes.getSideBName(item); RelationTypeMultiplicity multiplicity = relTypes.getMultiplicity(item); String defaultOrderTypeGuid = relTypes.getDefaultOrderTypeGuid(item); - rows.add(new RelationTypeRow(localId, item.getName(), item.getGuid(), DEFAULT_STORAGE_STATE, sideAName, - sideBName, artifactTypeSideA, artifactTypeSideB, multiplicity, defaultOrderTypeGuid)); + rows.add(new RelationTypeRow(item.getGuid(), item.getName(), item.getGuid(), DEFAULT_STORAGE_STATE, sideAName, + sideBName, sideAType.getGuid(), sideBType.getGuid(), multiplicity, defaultOrderTypeGuid)); } return new RelationTypeCacheUpdateResponse(rows); } @@ -359,9 +351,8 @@ public class OseeCacheServlet extends UnsecuredOseeHttpServlet { List<String[]> enumEntryRows = new ArrayList<String[]>(); EnumTypes enumTypes = orcsTypes.getEnumTypes(); for (EnumType type : enumTypes.getAll()) { - long localId = identityService.getLocalId(type); enumTypeRows.add(new String[] { - String.valueOf(localId), + String.valueOf(type.getGuid()), DEFAULT_STORAGE_STATE.toString(), String.valueOf(type.getGuid()), type.getName()}); diff --git a/plugins/org.eclipse.osee.framework.manager.servlet/src/org/eclipse/osee/framework/manager/servlet/OseeModelServlet.java b/plugins/org.eclipse.osee.framework.manager.servlet/src/org/eclipse/osee/framework/manager/servlet/OseeModelServlet.java index cbfb6d38754..5edff660955 100644 --- a/plugins/org.eclipse.osee.framework.manager.servlet/src/org/eclipse/osee/framework/manager/servlet/OseeModelServlet.java +++ b/plugins/org.eclipse.osee.framework.manager.servlet/src/org/eclipse/osee/framework/manager/servlet/OseeModelServlet.java @@ -133,10 +133,6 @@ public class OseeModelServlet extends SecureOseeHttpServlet { getOrcsTypes().loadTypes(resource, isInitializing(req)).call(); - if (modelRequest.isPersistAllowed()) { - getOrcsTypes().save().call(); - } - resp.setStatus(HttpServletResponse.SC_ACCEPTED); resp.setContentType("text/xml"); resp.setCharacterEncoding("UTF-8"); diff --git a/plugins/org.eclipse.osee.framework.manager.servlet/src/org/eclipse/osee/framework/manager/servlet/internal/ServletRegistrationHandler.java b/plugins/org.eclipse.osee.framework.manager.servlet/src/org/eclipse/osee/framework/manager/servlet/internal/ServletRegistrationHandler.java index 5f709580a67..fdbcc3b455e 100644 --- a/plugins/org.eclipse.osee.framework.manager.servlet/src/org/eclipse/osee/framework/manager/servlet/internal/ServletRegistrationHandler.java +++ b/plugins/org.eclipse.osee.framework.manager.servlet/src/org/eclipse/osee/framework/manager/servlet/internal/ServletRegistrationHandler.java @@ -20,7 +20,6 @@ import org.eclipse.osee.framework.core.server.IAuthenticationManager; import org.eclipse.osee.framework.core.server.ISessionManager; import org.eclipse.osee.framework.core.server.OseeHttpServlet; import org.eclipse.osee.framework.core.services.IOseeModelFactoryService; -import org.eclipse.osee.framework.core.services.IdentityService; import org.eclipse.osee.framework.core.services.TempCachingService; import org.eclipse.osee.framework.core.translation.IDataTranslationService; import org.eclipse.osee.framework.manager.servlet.AdminServlet; @@ -62,7 +61,6 @@ public class ServletRegistrationHandler { private IOseeModelFactoryService factoryService; private IResourceManager resourceManager; private OrcsApi orcsApi; - private IdentityService identityService; private final Set<String> contexts = new HashSet<String>(); @@ -70,10 +68,6 @@ public class ServletRegistrationHandler { this.sessionManager = sessionManager; } - public void setIdentityService(IdentityService identityService) { - this.identityService = identityService; - } - public void setServerLookup(IApplicationServerLookup serverLookup) { this.serverLookup = serverLookup; } @@ -147,7 +141,7 @@ public class ServletRegistrationHandler { register(new SessionManagementServlet(logger, sessionManager, authenticationManager), OseeServerContext.SESSION_CONTEXT); register(new SessionClientLoopbackServlet(logger, sessionManager), OseeServerContext.CLIENT_LOOPBACK_CONTEXT); - register(new OseeCacheServlet(logger, translationService, caching, orcsApi, factoryService, identityService), + register(new OseeCacheServlet(logger, translationService, caching, orcsApi, factoryService), OseeServerContext.CACHE_CONTEXT); register(new OseeModelServlet(logger, sessionManager, translationService, orcsApi), OseeServerContext.OSEE_MODEL_CONTEXT); |