diff options
author | Endi Sukma Dewata <edewata@redhat.com> | 2012-08-11 10:32:01 -0500 |
---|---|---|
committer | Endi Sukma Dewata <edewata@redhat.com> | 2012-08-15 12:07:39 -0500 |
commit | 3c9b8e787ccf066c38469e1fe2c119d5c410bb5e (patch) | |
tree | 88fdd1b9674f7a350ca56add03a99af13c58189f /base | |
parent | 108bd269ab0eb512c334939fabde68eeab5b0b67 (diff) | |
download | pki-3c9b8e787ccf066c38469e1fe2c119d5c410bb5e.tar.gz pki-3c9b8e787ccf066c38469e1fe2c119d5c410bb5e.tar.xz pki-3c9b8e787ccf066c38469e1fe2c119d5c410bb5e.zip |
Reorganized REST server classes.
The factory and DAO classes used by REST services have been moved
into the com.netscape.cms.servlet.<component> packages.
Ticket #215
Diffstat (limited to 'base')
17 files changed, 46 insertions, 30 deletions
diff --git a/base/common/src/com/netscape/cms/servlet/request/model/CertEnrollmentRequestFactory.java b/base/common/src/com/netscape/cms/servlet/cert/CertEnrollmentRequestFactory.java index 36c4adfca..2aab69b37 100644 --- a/base/common/src/com/netscape/cms/servlet/request/model/CertEnrollmentRequestFactory.java +++ b/base/common/src/com/netscape/cms/servlet/cert/CertEnrollmentRequestFactory.java @@ -15,7 +15,7 @@ //(C) 2012 Red Hat, Inc. //All rights reserved. //--- END COPYRIGHT BLOCK --- -package com.netscape.cms.servlet.request.model; +package com.netscape.cms.servlet.cert; import java.util.Enumeration; import java.util.Locale; @@ -25,8 +25,9 @@ import com.netscape.certsrv.profile.EProfileException; import com.netscape.certsrv.profile.IProfile; import com.netscape.certsrv.profile.IProfileInput; import com.netscape.cms.servlet.common.CMSRequest; +import com.netscape.cms.servlet.profile.ProfileInputFactory; import com.netscape.cms.servlet.profile.model.ProfileInput; -import com.netscape.cms.servlet.profile.model.ProfileInputFactory; +import com.netscape.cms.servlet.request.model.CertEnrollmentRequest; public class CertEnrollmentRequestFactory { diff --git a/base/common/src/com/netscape/cms/servlet/request/model/CertRequestDAO.java b/base/common/src/com/netscape/cms/servlet/cert/CertRequestDAO.java index 3aacf1b88..cac3371d0 100644 --- a/base/common/src/com/netscape/cms/servlet/request/model/CertRequestDAO.java +++ b/base/common/src/com/netscape/cms/servlet/cert/CertRequestDAO.java @@ -15,7 +15,7 @@ // (C) 2011 Red Hat, Inc. // All rights reserved. // --- END COPYRIGHT BLOCK --- -package com.netscape.cms.servlet.request.model; +package com.netscape.cms.servlet.cert; import java.util.ArrayList; import java.util.Collection; @@ -37,11 +37,15 @@ import com.netscape.certsrv.profile.IProfileSubsystem; import com.netscape.certsrv.request.IRequest; import com.netscape.certsrv.request.IRequestQueue; import com.netscape.certsrv.request.RequestId; -import com.netscape.cms.servlet.cert.EnrollmentProcessor; -import com.netscape.cms.servlet.cert.RenewalProcessor; -import com.netscape.cms.servlet.cert.RequestProcessor; import com.netscape.cms.servlet.processors.Processor; +import com.netscape.cms.servlet.request.CMSRequestDAO; import com.netscape.cms.servlet.request.RequestNotFoundException; +import com.netscape.cms.servlet.request.model.CMSRequestInfo; +import com.netscape.cms.servlet.request.model.CMSRequestInfos; +import com.netscape.cms.servlet.request.model.CertEnrollmentRequest; +import com.netscape.cms.servlet.request.model.CertRequestInfo; +import com.netscape.cms.servlet.request.model.CertRequestInfos; +import com.netscape.cms.servlet.request.model.CertReviewResponse; /** diff --git a/base/common/src/com/netscape/cms/servlet/request/model/CertRequestInfoFactory.java b/base/common/src/com/netscape/cms/servlet/cert/CertRequestInfoFactory.java index c21ea35c9..3320d946a 100644 --- a/base/common/src/com/netscape/cms/servlet/request/model/CertRequestInfoFactory.java +++ b/base/common/src/com/netscape/cms/servlet/cert/CertRequestInfoFactory.java @@ -16,7 +16,7 @@ // All rights reserved. // --- END COPYRIGHT BLOCK --- -package com.netscape.cms.servlet.request.model; +package com.netscape.cms.servlet.cert; import java.math.BigInteger; @@ -32,8 +32,8 @@ import com.netscape.certsrv.profile.IEnrollProfile; import com.netscape.certsrv.request.IRequest; import com.netscape.certsrv.request.RequestId; import com.netscape.certsrv.request.RequestStatus; -import com.netscape.cms.servlet.cert.CertResource; import com.netscape.cms.servlet.request.CertRequestResource; +import com.netscape.cms.servlet.request.model.CertRequestInfo; public class CertRequestInfoFactory { diff --git a/base/common/src/com/netscape/cms/servlet/request/model/CertReviewResponseFactory.java b/base/common/src/com/netscape/cms/servlet/cert/CertReviewResponseFactory.java index a27437d0f..7a7c3e9f0 100644 --- a/base/common/src/com/netscape/cms/servlet/request/model/CertReviewResponseFactory.java +++ b/base/common/src/com/netscape/cms/servlet/cert/CertReviewResponseFactory.java @@ -15,7 +15,7 @@ //(C) 2012 Red Hat, Inc. //All rights reserved. //--- END COPYRIGHT BLOCK --- -package com.netscape.cms.servlet.request.model; +package com.netscape.cms.servlet.cert; import java.util.Enumeration; import java.util.Locale; @@ -36,14 +36,15 @@ import com.netscape.certsrv.property.EPropertyException; import com.netscape.certsrv.request.IRequest; import com.netscape.cms.servlet.common.CMSRequest; import com.netscape.cms.servlet.processors.Processor; +import com.netscape.cms.servlet.profile.PolicyConstraintFactory; +import com.netscape.cms.servlet.profile.PolicyDefaultFactory; +import com.netscape.cms.servlet.profile.ProfileInputFactory; import com.netscape.cms.servlet.profile.model.PolicyConstraint; -import com.netscape.cms.servlet.profile.model.PolicyConstraintFactory; import com.netscape.cms.servlet.profile.model.PolicyDefault; -import com.netscape.cms.servlet.profile.model.PolicyDefaultFactory; import com.netscape.cms.servlet.profile.model.ProfileInput; -import com.netscape.cms.servlet.profile.model.ProfileInputFactory; import com.netscape.cms.servlet.profile.model.ProfilePolicy; import com.netscape.cms.servlet.profile.model.ProfilePolicySet; +import com.netscape.cms.servlet.request.model.CertReviewResponse; public class CertReviewResponseFactory { diff --git a/base/common/src/com/netscape/cms/servlet/cert/CertService.java b/base/common/src/com/netscape/cms/servlet/cert/CertService.java index 365e89977..0ccccf7bd 100644 --- a/base/common/src/com/netscape/cms/servlet/cert/CertService.java +++ b/base/common/src/com/netscape/cms/servlet/cert/CertService.java @@ -64,7 +64,6 @@ import com.netscape.cms.servlet.cert.model.CertSearchRequest; import com.netscape.cms.servlet.cert.model.CertUnrevokeRequest; import com.netscape.cms.servlet.cert.model.CertData; import com.netscape.cms.servlet.processors.Processor; -import com.netscape.cms.servlet.request.model.CertRequestDAO; import com.netscape.cms.servlet.request.model.CertRequestInfo; import com.netscape.cms.servlet.request.model.CertRetrievalRequest; import com.netscape.cmsutil.ldap.LDAPUtil; diff --git a/base/common/src/com/netscape/cms/servlet/cert/EnrollmentProcessor.java b/base/common/src/com/netscape/cms/servlet/cert/EnrollmentProcessor.java index 1d8a5695a..cfd3be05f 100644 --- a/base/common/src/com/netscape/cms/servlet/cert/EnrollmentProcessor.java +++ b/base/common/src/com/netscape/cms/servlet/cert/EnrollmentProcessor.java @@ -39,7 +39,6 @@ import com.netscape.cms.servlet.common.CMSRequest; import com.netscape.cms.servlet.profile.SSLClientCertProvider; import com.netscape.cms.servlet.profile.model.ProfileInput; import com.netscape.cms.servlet.request.model.CertEnrollmentRequest; -import com.netscape.cms.servlet.request.model.CertEnrollmentRequestFactory; public class EnrollmentProcessor extends CertProcessor { diff --git a/base/common/src/com/netscape/cms/servlet/cert/RenewalProcessor.java b/base/common/src/com/netscape/cms/servlet/cert/RenewalProcessor.java index 3714d9807..2a9f10648 100644 --- a/base/common/src/com/netscape/cms/servlet/cert/RenewalProcessor.java +++ b/base/common/src/com/netscape/cms/servlet/cert/RenewalProcessor.java @@ -45,7 +45,6 @@ import com.netscape.certsrv.request.IRequest; import com.netscape.cms.servlet.common.CMSRequest; import com.netscape.cms.servlet.profile.SSLClientCertProvider; import com.netscape.cms.servlet.request.model.CertEnrollmentRequest; -import com.netscape.cms.servlet.request.model.CertEnrollmentRequestFactory; public class RenewalProcessor extends CertProcessor { diff --git a/base/common/src/com/netscape/cms/servlet/cert/RequestProcessor.java b/base/common/src/com/netscape/cms/servlet/cert/RequestProcessor.java index 2b26773f6..b1757f130 100644 --- a/base/common/src/com/netscape/cms/servlet/cert/RequestProcessor.java +++ b/base/common/src/com/netscape/cms/servlet/cert/RequestProcessor.java @@ -52,13 +52,12 @@ import com.netscape.certsrv.request.RequestId; import com.netscape.certsrv.request.RequestStatus; import com.netscape.cms.profile.common.ProfilePolicy; import com.netscape.cms.servlet.common.CMSRequest; +import com.netscape.cms.servlet.profile.ProfileOutputFactory; import com.netscape.cms.servlet.profile.model.PolicyDefault; import com.netscape.cms.servlet.profile.model.ProfileAttribute; import com.netscape.cms.servlet.profile.model.ProfileOutput; -import com.netscape.cms.servlet.profile.model.ProfileOutputFactory; import com.netscape.cms.servlet.profile.model.ProfilePolicySet; import com.netscape.cms.servlet.request.model.CertReviewResponse; -import com.netscape.cms.servlet.request.model.CertReviewResponseFactory; public class RequestProcessor extends CertProcessor { diff --git a/base/common/src/com/netscape/cms/servlet/request/model/KeyRequestDAO.java b/base/common/src/com/netscape/cms/servlet/key/KeyRequestDAO.java index 6e9de9290..2dffac22e 100644 --- a/base/common/src/com/netscape/cms/servlet/request/model/KeyRequestDAO.java +++ b/base/common/src/com/netscape/cms/servlet/key/KeyRequestDAO.java @@ -15,7 +15,7 @@ // (C) 2011 Red Hat, Inc. // All rights reserved. // --- END COPYRIGHT BLOCK --- -package com.netscape.cms.servlet.request.model; +package com.netscape.cms.servlet.key; import java.util.ArrayList; import java.util.Collection; @@ -37,8 +37,14 @@ import com.netscape.certsrv.profile.IEnrollProfile; import com.netscape.certsrv.request.IRequest; import com.netscape.certsrv.request.RequestId; import com.netscape.certsrv.request.RequestStatus; -import com.netscape.cms.servlet.key.KeyResource; +import com.netscape.cms.servlet.request.CMSRequestDAO; import com.netscape.cms.servlet.request.KeyRequestResource; +import com.netscape.cms.servlet.request.model.CMSRequestInfo; +import com.netscape.cms.servlet.request.model.CMSRequestInfos; +import com.netscape.cms.servlet.request.model.KeyArchivalRequest; +import com.netscape.cms.servlet.request.model.KeyRecoveryRequest; +import com.netscape.cms.servlet.request.model.KeyRequestInfo; +import com.netscape.cms.servlet.request.model.KeyRequestInfos; /** * @author alee diff --git a/base/common/src/com/netscape/cms/servlet/key/KeyService.java b/base/common/src/com/netscape/cms/servlet/key/KeyService.java index ffd0ef739..965723113 100644 --- a/base/common/src/com/netscape/cms/servlet/key/KeyService.java +++ b/base/common/src/com/netscape/cms/servlet/key/KeyService.java @@ -45,7 +45,6 @@ import com.netscape.cms.servlet.base.PKIService; import com.netscape.cms.servlet.key.model.KeyData; import com.netscape.cms.servlet.key.model.KeyDataInfo; import com.netscape.cms.servlet.key.model.KeyDataInfos; -import com.netscape.cms.servlet.request.model.KeyRequestDAO; import com.netscape.cms.servlet.request.model.KeyRequestInfo; import com.netscape.cms.servlet.request.model.KeyRecoveryRequest; import com.netscape.cmsutil.ldap.LDAPUtil; diff --git a/base/common/src/com/netscape/cms/servlet/profile/model/PolicyConstraintFactory.java b/base/common/src/com/netscape/cms/servlet/profile/PolicyConstraintFactory.java index bd361a752..5ceecd4a5 100644 --- a/base/common/src/com/netscape/cms/servlet/profile/model/PolicyConstraintFactory.java +++ b/base/common/src/com/netscape/cms/servlet/profile/PolicyConstraintFactory.java @@ -15,13 +15,15 @@ // (C) 2012 Red Hat, Inc. // All rights reserved. // --- END COPYRIGHT BLOCK --- -package com.netscape.cms.servlet.profile.model; +package com.netscape.cms.servlet.profile; import java.util.Enumeration; import java.util.Locale; import com.netscape.certsrv.profile.IPolicyConstraint; import com.netscape.certsrv.property.Descriptor; +import com.netscape.cms.servlet.profile.model.PolicyConstraint; +import com.netscape.cms.servlet.profile.model.PolicyConstraintValue; public class PolicyConstraintFactory { diff --git a/base/common/src/com/netscape/cms/servlet/profile/model/PolicyDefaultFactory.java b/base/common/src/com/netscape/cms/servlet/profile/PolicyDefaultFactory.java index 6b9379f0b..01c19936d 100644 --- a/base/common/src/com/netscape/cms/servlet/profile/model/PolicyDefaultFactory.java +++ b/base/common/src/com/netscape/cms/servlet/profile/PolicyDefaultFactory.java @@ -15,7 +15,7 @@ // (C) 2012 Red Hat, Inc. // All rights reserved. // --- END COPYRIGHT BLOCK --- -package com.netscape.cms.servlet.profile.model; +package com.netscape.cms.servlet.profile; import java.util.Enumeration; import java.util.Locale; @@ -25,6 +25,8 @@ import com.netscape.certsrv.profile.IPolicyDefault; import com.netscape.certsrv.property.Descriptor; import com.netscape.certsrv.property.EPropertyException; import com.netscape.certsrv.request.IRequest; +import com.netscape.cms.servlet.profile.model.PolicyDefault; +import com.netscape.cms.servlet.profile.model.ProfileAttribute; public class PolicyDefaultFactory { diff --git a/base/common/src/com/netscape/cms/servlet/profile/model/ProfileInputFactory.java b/base/common/src/com/netscape/cms/servlet/profile/ProfileInputFactory.java index 67d3e9a2c..1e9f4598c 100644 --- a/base/common/src/com/netscape/cms/servlet/profile/model/ProfileInputFactory.java +++ b/base/common/src/com/netscape/cms/servlet/profile/ProfileInputFactory.java @@ -1,4 +1,4 @@ -package com.netscape.cms.servlet.profile.model; +package com.netscape.cms.servlet.profile; import java.util.Enumeration; import java.util.Locale; @@ -7,6 +7,7 @@ import com.netscape.certsrv.base.IArgBlock; import com.netscape.certsrv.profile.EProfileException; import com.netscape.certsrv.profile.IProfileInput; import com.netscape.certsrv.request.IRequest; +import com.netscape.cms.servlet.profile.model.ProfileInput; public class ProfileInputFactory { diff --git a/base/common/src/com/netscape/cms/servlet/profile/model/ProfileOutputFactory.java b/base/common/src/com/netscape/cms/servlet/profile/ProfileOutputFactory.java index 93bbaa2c5..e15875eff 100644 --- a/base/common/src/com/netscape/cms/servlet/profile/model/ProfileOutputFactory.java +++ b/base/common/src/com/netscape/cms/servlet/profile/ProfileOutputFactory.java @@ -15,7 +15,7 @@ //(C) 2012 Red Hat, Inc. //All rights reserved. //--- END COPYRIGHT BLOCK --- -package com.netscape.cms.servlet.profile.model; +package com.netscape.cms.servlet.profile; import java.util.Enumeration; import java.util.Locale; @@ -24,6 +24,8 @@ import com.netscape.certsrv.profile.EProfileException; import com.netscape.certsrv.profile.IProfileOutput; import com.netscape.certsrv.property.Descriptor; import com.netscape.certsrv.request.IRequest; +import com.netscape.cms.servlet.profile.model.ProfileAttribute; +import com.netscape.cms.servlet.profile.model.ProfileOutput; public class ProfileOutputFactory { diff --git a/base/common/src/com/netscape/cms/servlet/request/model/CMSRequestDAO.java b/base/common/src/com/netscape/cms/servlet/request/CMSRequestDAO.java index 5ac984168..5d1df774d 100644 --- a/base/common/src/com/netscape/cms/servlet/request/model/CMSRequestDAO.java +++ b/base/common/src/com/netscape/cms/servlet/request/CMSRequestDAO.java @@ -15,7 +15,7 @@ // (C) 2011 Red Hat, Inc. // All rights reserved. // --- END COPYRIGHT BLOCK --- -package com.netscape.cms.servlet.request.model; +package com.netscape.cms.servlet.request; import java.net.URI; import java.util.ArrayList; @@ -34,6 +34,8 @@ import com.netscape.certsrv.request.IRequestQueue; import com.netscape.certsrv.request.IRequestVirtualList; import com.netscape.certsrv.request.RequestId; import com.netscape.cms.servlet.base.model.Link; +import com.netscape.cms.servlet.request.model.CMSRequestInfo; +import com.netscape.cms.servlet.request.model.CMSRequestInfos; /** * @author alee @@ -161,6 +163,6 @@ public abstract class CMSRequestDAO { return false; } - abstract CMSRequestInfo createCMSRequestInfo(IRequest request, UriInfo uriInfo); + protected abstract CMSRequestInfo createCMSRequestInfo(IRequest request, UriInfo uriInfo); } diff --git a/base/common/src/com/netscape/cms/servlet/request/CertRequestService.java b/base/common/src/com/netscape/cms/servlet/request/CertRequestService.java index e1aa56592..174b6d7fb 100644 --- a/base/common/src/com/netscape/cms/servlet/request/CertRequestService.java +++ b/base/common/src/com/netscape/cms/servlet/request/CertRequestService.java @@ -35,11 +35,11 @@ import com.netscape.certsrv.request.RequestId; import com.netscape.cms.servlet.base.BadRequestException; import com.netscape.cms.servlet.base.PKIException; import com.netscape.cms.servlet.base.PKIService; -import com.netscape.cms.servlet.request.model.CertReviewResponse; -import com.netscape.cms.servlet.request.model.CertRequestDAO; +import com.netscape.cms.servlet.cert.CertRequestDAO; +import com.netscape.cms.servlet.request.model.CertEnrollmentRequest; import com.netscape.cms.servlet.request.model.CertRequestInfo; import com.netscape.cms.servlet.request.model.CertRequestInfos; -import com.netscape.cms.servlet.request.model.CertEnrollmentRequest; +import com.netscape.cms.servlet.request.model.CertReviewResponse; import com.netscape.cmsutil.ldap.LDAPUtil; /** diff --git a/base/common/src/com/netscape/cms/servlet/request/KeyRequestService.java b/base/common/src/com/netscape/cms/servlet/request/KeyRequestService.java index e2afaf58c..188bcb23c 100644 --- a/base/common/src/com/netscape/cms/servlet/request/KeyRequestService.java +++ b/base/common/src/com/netscape/cms/servlet/request/KeyRequestService.java @@ -27,8 +27,8 @@ import com.netscape.certsrv.base.EBaseException; import com.netscape.certsrv.request.RequestId; import com.netscape.cms.servlet.base.PKIException; import com.netscape.cms.servlet.base.PKIService; +import com.netscape.cms.servlet.key.KeyRequestDAO; import com.netscape.cms.servlet.request.model.KeyArchivalRequest; -import com.netscape.cms.servlet.request.model.KeyRequestDAO; import com.netscape.cms.servlet.request.model.KeyRequestInfo; import com.netscape.cms.servlet.request.model.KeyRequestInfos; import com.netscape.cms.servlet.request.model.KeyRecoveryRequest; |