From 62cc34bf18c45e12a07973d0c57689b48a8f503f Mon Sep 17 00:00:00 2001
From: "Endi S. Dewata" <edewata@redhat.com>
Date: Thu, 8 May 2014 23:58:31 -0400
Subject: [PATCH] Added minimum search keyword length requirement.

Some REST services that accept search keywords have been modified to
require a minimum length of 3 characters.

The DEFAULT_SIZE constant has been moved into the base PKIService
class to reduce multiple declarations.

Ticket #920
---
 .../org/dogtagpki/server/ca/rest/CertService.java  |  1 -
 .../dogtagpki/server/ca/rest/ProfileService.java   |  2 --
 .../org/dogtagpki/server/kra/rest/KeyService.java  |  1 -
 .../com/netscape/cms/servlet/base/PKIService.java  |  3 ++
 .../org/dogtagpki/server/rest/AuditService.java    |  2 --
 .../org/dogtagpki/server/rest/GroupService.java    | 17 +++++++----
 .../org/dogtagpki/server/rest/SelfTestService.java | 12 ++++----
 .../src/org/dogtagpki/server/rest/UserService.java | 34 +++++++++++++---------
 .../server/tks/rest/TPSConnectorService.java       |  2 --
 .../dogtagpki/server/tps/config/ConfigService.java |  2 --
 .../dogtagpki/server/tps/rest/ActivityService.java | 12 ++++----
 .../server/tps/rest/AuthenticatorService.java      | 12 ++++----
 .../server/tps/rest/ConnectorService.java          | 12 ++++----
 .../server/tps/rest/ProfileMappingService.java     | 12 ++++----
 .../dogtagpki/server/tps/rest/ProfileService.java  | 12 ++++----
 .../dogtagpki/server/tps/rest/TPSCertService.java  | 12 ++++----
 .../dogtagpki/server/tps/rest/TokenService.java    | 12 ++++----
 17 files changed, 92 insertions(+), 68 deletions(-)

diff --git a/base/ca/src/org/dogtagpki/server/ca/rest/CertService.java b/base/ca/src/org/dogtagpki/server/ca/rest/CertService.java
index 1b7120b376d09596efb853d188e218d008b64f61..487b2b522bd01dcfd621f89902a1de88dc35840d 100644
--- a/base/ca/src/org/dogtagpki/server/ca/rest/CertService.java
+++ b/base/ca/src/org/dogtagpki/server/ca/rest/CertService.java
@@ -108,7 +108,6 @@ public class CertService extends PKIService implements CertResource {
 
     public static final int DEFAULT_MAXTIME = 0;
     public static final int DEFAULT_MAXRESULTS = 20;
-    public final static int DEFAULT_SIZE = 20;
 
     public CertService() {
         authority = (ICertificateAuthority) CMS.getSubsystem("ca");
diff --git a/base/ca/src/org/dogtagpki/server/ca/rest/ProfileService.java b/base/ca/src/org/dogtagpki/server/ca/rest/ProfileService.java
index 4c2b259b2d6e5195526ab89cc51cab92a7da0af9..3b2f8a50ebcd18fe0098b2e92e0300645b904fa3 100644
--- a/base/ca/src/org/dogtagpki/server/ca/rest/ProfileService.java
+++ b/base/ca/src/org/dogtagpki/server/ca/rest/ProfileService.java
@@ -97,8 +97,6 @@ public class ProfileService extends PKIService implements ProfileResource {
     @Context
     private HttpServletRequest servletRequest;
 
-    public final static int DEFAULT_SIZE = 20;
-
     private IProfileSubsystem ps = (IProfileSubsystem) CMS.getSubsystem(IProfileSubsystem.ID);
     private IPluginRegistry registry = (IPluginRegistry) CMS.getSubsystem(CMS.SUBSYSTEM_REGISTRY);
     private IConfigStore cs = CMS.getConfigStore().getSubStore("profile");
diff --git a/base/kra/src/org/dogtagpki/server/kra/rest/KeyService.java b/base/kra/src/org/dogtagpki/server/kra/rest/KeyService.java
index 93fc53b129c6e2d9578d868db6280645006eeabe..cfb84a5bf5fae7b5373c672f9468549054c7eae4 100644
--- a/base/kra/src/org/dogtagpki/server/kra/rest/KeyService.java
+++ b/base/kra/src/org/dogtagpki/server/kra/rest/KeyService.java
@@ -95,7 +95,6 @@ public class KeyService extends PKIService implements KeyResource {
 
     public static final int DEFAULT_MAXRESULTS = 100;
     public static final int DEFAULT_MAXTIME = 10;
-    public final static int DEFAULT_SIZE = 20;
 
     private IKeyRepository repo;
     private IKeyRecoveryAuthority kra;
diff --git a/base/server/cms/src/com/netscape/cms/servlet/base/PKIService.java b/base/server/cms/src/com/netscape/cms/servlet/base/PKIService.java
index 866db63fd9273b5d88036cdb631abc3c04f5b22a..edd7da38d8efde5cb641e709120f5f1d375fb8b1 100644
--- a/base/server/cms/src/com/netscape/cms/servlet/base/PKIService.java
+++ b/base/server/cms/src/com/netscape/cms/servlet/base/PKIService.java
@@ -58,6 +58,9 @@ public class PKIService {
             MediaType.APPLICATION_JSON_TYPE
     );
 
+    public final static int MIN_FILTER_LENGTH = 3;
+    public final static int DEFAULT_SIZE = 20;
+
     @Context
     private HttpHeaders headers;
 
diff --git a/base/server/cms/src/org/dogtagpki/server/rest/AuditService.java b/base/server/cms/src/org/dogtagpki/server/rest/AuditService.java
index c9900717067329e95f8b3be46f42eb8e95600a79..e32c36c3313e8bbb3ea729245dcd51d5f2fda7a7 100644
--- a/base/server/cms/src/org/dogtagpki/server/rest/AuditService.java
+++ b/base/server/cms/src/org/dogtagpki/server/rest/AuditService.java
@@ -61,8 +61,6 @@ public class AuditService extends PKIService implements AuditResource {
     @Context
     private HttpServletRequest servletRequest;
 
-    public final static int DEFAULT_SIZE = 20;
-
     public AuditService() {
         CMS.debug("AuditService.<init>()");
     }
diff --git a/base/server/cms/src/org/dogtagpki/server/rest/GroupService.java b/base/server/cms/src/org/dogtagpki/server/rest/GroupService.java
index 3e98d3940bbe194c937df956d2f32cd439581a37..2f0a1699651292262c88106df94b5dc70a7612a9 100644
--- a/base/server/cms/src/org/dogtagpki/server/rest/GroupService.java
+++ b/base/server/cms/src/org/dogtagpki/server/rest/GroupService.java
@@ -69,8 +69,6 @@ public class GroupService extends PKIService implements GroupResource {
     @Context
     private HttpServletRequest servletRequest;
 
-    public final static int DEFAULT_SIZE = 20;
-
     public IUGSubsystem userGroupManager = (IUGSubsystem) CMS.getSubsystem(CMS.SUBSYSTEM_UG);
 
     public GroupData createGroupData(IGroup group) throws Exception {
@@ -102,10 +100,15 @@ public class GroupService extends PKIService implements GroupResource {
      */
     @Override
     public Response findGroups(String filter, Integer start, Integer size) {
+
+        if (filter != null && filter.length() < MIN_FILTER_LENGTH) {
+            throw new BadRequestException("Filter is too short.");
+        }
+
+        start = start == null ? 0 : start;
+        size = size == null ? DEFAULT_SIZE : size;
+
         try {
-            start = start == null ? 0 : start;
-            size = size == null ? DEFAULT_SIZE : size;
-
             Enumeration<IGroup> groups = userGroupManager.listGroups(filter);
 
             GroupCollection response = new GroupCollection();
@@ -342,6 +345,10 @@ public class GroupService extends PKIService implements GroupResource {
 
         if (groupID == null) throw new BadRequestException("Group ID is null.");
 
+        if (filter != null && filter.length() < 3) {
+            throw new BadRequestException("Filter is too short.");
+        }
+
         try {
             GroupMemberProcessor processor = new GroupMemberProcessor(getLocale(headers));
             processor.setUriInfo(uriInfo);
diff --git a/base/server/cms/src/org/dogtagpki/server/rest/SelfTestService.java b/base/server/cms/src/org/dogtagpki/server/rest/SelfTestService.java
index 62993f68e7bcd40744bf526ce335454e4b7de085..de9bd04ad21d8f387c270e3a4ff20274d1951915 100644
--- a/base/server/cms/src/org/dogtagpki/server/rest/SelfTestService.java
+++ b/base/server/cms/src/org/dogtagpki/server/rest/SelfTestService.java
@@ -61,8 +61,6 @@ public class SelfTestService extends PKIService implements SelfTestResource {
     @Context
     private HttpServletRequest servletRequest;
 
-    public final static int DEFAULT_SIZE = 20;
-
     public SelfTestService() {
         CMS.debug("SelfTestService.<init>()");
     }
@@ -99,10 +97,14 @@ public class SelfTestService extends PKIService implements SelfTestResource {
 
         CMS.debug("SelfTestService.findSelfTests()");
 
+        if (filter != null && filter.length() < MIN_FILTER_LENGTH) {
+            throw new BadRequestException("Filter is too short.");
+        }
+
+        start = start == null ? 0 : start;
+        size = size == null ? DEFAULT_SIZE : size;
+
         try {
-            start = start == null ? 0 : start;
-            size = size == null ? DEFAULT_SIZE : size;
-
             ISelfTestSubsystem subsystem = (ISelfTestSubsystem)CMS.getSubsystem(ISelfTestSubsystem.ID);
 
             // filter self tests
diff --git a/base/server/cms/src/org/dogtagpki/server/rest/UserService.java b/base/server/cms/src/org/dogtagpki/server/rest/UserService.java
index f4d7a13c58834f1c837309c9d7b850db66e018b8..53ecc2b9e778db3bf6e14bc05989446d4a741223 100644
--- a/base/server/cms/src/org/dogtagpki/server/rest/UserService.java
+++ b/base/server/cms/src/org/dogtagpki/server/rest/UserService.java
@@ -96,8 +96,6 @@ public class UserService extends PKIService implements UserResource {
     @Context
     private HttpServletRequest servletRequest;
 
-    public final static int DEFAULT_SIZE = 20;
-
     public final static String BACK_SLASH = "\\";
     public final static String SYSTEM_USER = "$System$";
 
@@ -132,11 +130,17 @@ public class UserService extends PKIService implements UserResource {
      */
     @Override
     public Response findUsers(String filter, Integer start, Integer size) {
+
+        if (filter != null && filter.length() < MIN_FILTER_LENGTH) {
+            throw new BadRequestException("Filter is too short.");
+        }
+
+        start = start == null ? 0 : start;
+        size = size == null ? DEFAULT_SIZE : size;
+
         UserCollection response = new UserCollection();
-        try {
-            start = start == null ? 0 : start;
-            size = size == null ? DEFAULT_SIZE : size;
 
+        try {
             Enumeration<IUser> users = userGroupManager.findUsers(filter);
 
             int i = 0;
@@ -1053,15 +1057,19 @@ public class UserService extends PKIService implements UserResource {
 
         CMS.debug("UserService.findUserMemberships(" + userID + ", " + filter + ")");
 
+        if (userID == null) {
+            log(ILogger.LL_FAILURE, CMS.getLogMessage("ADMIN_SRVLT_NULL_RS_ID"));
+            throw new BadRequestException(getUserMessage("CMS_ADMIN_SRVLT_NULL_RS_ID", headers));
+        }
+
+        if (filter != null && filter.length() < 3) {
+            throw new BadRequestException("Filter is too short.");
+        }
+
+        start = start == null ? 0 : start;
+        size = size == null ? DEFAULT_SIZE : size;
+
         try {
-            start = start == null ? 0 : start;
-            size = size == null ? DEFAULT_SIZE : size;
-
-            if (userID == null) {
-                log(ILogger.LL_FAILURE, CMS.getLogMessage("ADMIN_SRVLT_NULL_RS_ID"));
-                throw new BadRequestException(getUserMessage("CMS_ADMIN_SRVLT_NULL_RS_ID", headers));
-            }
-
             IUser user = userGroupManager.getUser(userID);
 
             if (user == null) {
diff --git a/base/tks/src/org/dogtagpki/server/tks/rest/TPSConnectorService.java b/base/tks/src/org/dogtagpki/server/tks/rest/TPSConnectorService.java
index 36512690aef03882c6414cdeae0337663a916b92..93cd411cb6403ef68a9d9a0766cbaf6df30d40e1 100644
--- a/base/tks/src/org/dogtagpki/server/tks/rest/TPSConnectorService.java
+++ b/base/tks/src/org/dogtagpki/server/tks/rest/TPSConnectorService.java
@@ -54,8 +54,6 @@ public class TPSConnectorService extends PKIService implements TPSConnectorResou
     @Context
     private HttpServletRequest servletRequest;
 
-    public final static int DEFAULT_SIZE = 20;
-
     public IUGSubsystem userGroupManager = (IUGSubsystem) CMS.getSubsystem(CMS.SUBSYSTEM_UG);
 
     @Override
diff --git a/base/tps-tomcat/src/org/dogtagpki/server/tps/config/ConfigService.java b/base/tps-tomcat/src/org/dogtagpki/server/tps/config/ConfigService.java
index 84d9d786e4494934ecd7bcd52afe0823213a8ba1..6cd5e9f7d8be3229f6bb83ace5bb83b5990feab2 100644
--- a/base/tps-tomcat/src/org/dogtagpki/server/tps/config/ConfigService.java
+++ b/base/tps-tomcat/src/org/dogtagpki/server/tps/config/ConfigService.java
@@ -55,8 +55,6 @@ public class ConfigService extends PKIService implements ConfigResource {
     @Context
     private HttpServletRequest servletRequest;
 
-    public final static int DEFAULT_SIZE = 20;
-
     public ConfigService() {
         CMS.debug("ConfigService.<init>()");
     }
diff --git a/base/tps-tomcat/src/org/dogtagpki/server/tps/rest/ActivityService.java b/base/tps-tomcat/src/org/dogtagpki/server/tps/rest/ActivityService.java
index 1fb1e4c8260df592b0cccc561708d185def71cad..ca499e7ca932728502f288cfc2aefc207001a67f 100644
--- a/base/tps-tomcat/src/org/dogtagpki/server/tps/rest/ActivityService.java
+++ b/base/tps-tomcat/src/org/dogtagpki/server/tps/rest/ActivityService.java
@@ -60,8 +60,6 @@ public class ActivityService extends PKIService implements ActivityResource {
     @Context
     private HttpServletRequest servletRequest;
 
-    public final static int DEFAULT_SIZE = 20;
-
     public ActivityService() {
         CMS.debug("ActivityService.<init>()");
     }
@@ -104,10 +102,14 @@ public class ActivityService extends PKIService implements ActivityResource {
 
         CMS.debug("ActivityService.findActivities()");
 
+        if (filter != null && filter.length() < MIN_FILTER_LENGTH) {
+            throw new BadRequestException("Filter is too short.");
+        }
+
+        start = start == null ? 0 : start;
+        size = size == null ? DEFAULT_SIZE : size;
+
         try {
-            start = start == null ? 0 : start;
-            size = size == null ? DEFAULT_SIZE : size;
-
             TPSSubsystem subsystem = (TPSSubsystem)CMS.getSubsystem(TPSSubsystem.ID);
             ActivityDatabase database = subsystem.getActivityDatabase();
 
diff --git a/base/tps-tomcat/src/org/dogtagpki/server/tps/rest/AuthenticatorService.java b/base/tps-tomcat/src/org/dogtagpki/server/tps/rest/AuthenticatorService.java
index 5d699a408377c2c0e5a91ebceaf2557ee5e1addd..d862e261dc9938d83133490ceccc2b9a28fbecc8 100644
--- a/base/tps-tomcat/src/org/dogtagpki/server/tps/rest/AuthenticatorService.java
+++ b/base/tps-tomcat/src/org/dogtagpki/server/tps/rest/AuthenticatorService.java
@@ -63,8 +63,6 @@ public class AuthenticatorService extends PKIService implements AuthenticatorRes
     @Context
     private HttpServletRequest servletRequest;
 
-    public final static int DEFAULT_SIZE = 20;
-
     public AuthenticatorService() {
         CMS.debug("AuthenticatorService.<init>()");
     }
@@ -100,10 +98,14 @@ public class AuthenticatorService extends PKIService implements AuthenticatorRes
 
         CMS.debug("AuthenticatorService.findAuthenticators()");
 
+        if (filter != null && filter.length() < MIN_FILTER_LENGTH) {
+            throw new BadRequestException("Filter is too short.");
+        }
+
+        start = start == null ? 0 : start;
+        size = size == null ? DEFAULT_SIZE : size;
+
         try {
-            start = start == null ? 0 : start;
-            size = size == null ? DEFAULT_SIZE : size;
-
             TPSSubsystem subsystem = (TPSSubsystem)CMS.getSubsystem(TPSSubsystem.ID);
             AuthenticatorDatabase database = subsystem.getAuthenticatorDatabase();
 
diff --git a/base/tps-tomcat/src/org/dogtagpki/server/tps/rest/ConnectorService.java b/base/tps-tomcat/src/org/dogtagpki/server/tps/rest/ConnectorService.java
index 1a325070a25c21f837525c10f24146c9788daff6..c281265effa3602aa357a623fcd3891727f74eee 100644
--- a/base/tps-tomcat/src/org/dogtagpki/server/tps/rest/ConnectorService.java
+++ b/base/tps-tomcat/src/org/dogtagpki/server/tps/rest/ConnectorService.java
@@ -63,8 +63,6 @@ public class ConnectorService extends PKIService implements ConnectorResource {
     @Context
     private HttpServletRequest servletRequest;
 
-    public final static int DEFAULT_SIZE = 20;
-
     public ConnectorService() {
         CMS.debug("ConnectorService.<init>()");
     }
@@ -100,10 +98,14 @@ public class ConnectorService extends PKIService implements ConnectorResource {
 
         CMS.debug("ConnectorService.findConnectors()");
 
+        if (filter != null && filter.length() < MIN_FILTER_LENGTH) {
+            throw new BadRequestException("Filter is too short.");
+        }
+
+        start = start == null ? 0 : start;
+        size = size == null ? DEFAULT_SIZE : size;
+
         try {
-            start = start == null ? 0 : start;
-            size = size == null ? DEFAULT_SIZE : size;
-
             TPSSubsystem subsystem = (TPSSubsystem)CMS.getSubsystem(TPSSubsystem.ID);
             ConnectorDatabase database = subsystem.getConnectorDatabase();
 
diff --git a/base/tps-tomcat/src/org/dogtagpki/server/tps/rest/ProfileMappingService.java b/base/tps-tomcat/src/org/dogtagpki/server/tps/rest/ProfileMappingService.java
index 46a2cf341a39c7d4c82bad430ed2cbf57020e1d1..f3a6f2e38ce14f74001cdb9fecf2c1880c2f8c4d 100644
--- a/base/tps-tomcat/src/org/dogtagpki/server/tps/rest/ProfileMappingService.java
+++ b/base/tps-tomcat/src/org/dogtagpki/server/tps/rest/ProfileMappingService.java
@@ -63,8 +63,6 @@ public class ProfileMappingService extends PKIService implements ProfileMappingR
     @Context
     private HttpServletRequest servletRequest;
 
-    public final static int DEFAULT_SIZE = 20;
-
     public ProfileMappingService() {
         CMS.debug("ProfileMappingService.<init>()");
     }
@@ -100,10 +98,14 @@ public class ProfileMappingService extends PKIService implements ProfileMappingR
 
         CMS.debug("ProfileMappingService.findProfileMappings()");
 
+        if (filter != null && filter.length() < MIN_FILTER_LENGTH) {
+            throw new BadRequestException("Filter is too short.");
+        }
+
+        start = start == null ? 0 : start;
+        size = size == null ? DEFAULT_SIZE : size;
+
         try {
-            start = start == null ? 0 : start;
-            size = size == null ? DEFAULT_SIZE : size;
-
             TPSSubsystem subsystem = (TPSSubsystem)CMS.getSubsystem(TPSSubsystem.ID);
             ProfileMappingDatabase database = subsystem.getProfileMappingDatabase();
 
diff --git a/base/tps-tomcat/src/org/dogtagpki/server/tps/rest/ProfileService.java b/base/tps-tomcat/src/org/dogtagpki/server/tps/rest/ProfileService.java
index 02ec991468e4f2c753d3f61ae824eaff5f6c35a5..e5bfd4663827e7bded285c5c11b3ab0426abe40b 100644
--- a/base/tps-tomcat/src/org/dogtagpki/server/tps/rest/ProfileService.java
+++ b/base/tps-tomcat/src/org/dogtagpki/server/tps/rest/ProfileService.java
@@ -63,8 +63,6 @@ public class ProfileService extends PKIService implements ProfileResource {
     @Context
     private HttpServletRequest servletRequest;
 
-    public final static int DEFAULT_SIZE = 20;
-
     public ProfileService() {
         CMS.debug("ProfileService.<init>()");
     }
@@ -100,10 +98,14 @@ public class ProfileService extends PKIService implements ProfileResource {
 
         CMS.debug("ProfileService.findProfiles()");
 
+        if (filter != null && filter.length() < MIN_FILTER_LENGTH) {
+            throw new BadRequestException("Filter is too short.");
+        }
+
+        start = start == null ? 0 : start;
+        size = size == null ? DEFAULT_SIZE : size;
+
         try {
-            start = start == null ? 0 : start;
-            size = size == null ? DEFAULT_SIZE : size;
-
             TPSSubsystem subsystem = (TPSSubsystem)CMS.getSubsystem(TPSSubsystem.ID);
             ProfileDatabase database = subsystem.getProfileDatabase();
 
diff --git a/base/tps-tomcat/src/org/dogtagpki/server/tps/rest/TPSCertService.java b/base/tps-tomcat/src/org/dogtagpki/server/tps/rest/TPSCertService.java
index 275631ba4988f75b33fc4bab79debb3d32c45c88..75314cd5de12a4fb91c3040b1eb2acc356c60737 100644
--- a/base/tps-tomcat/src/org/dogtagpki/server/tps/rest/TPSCertService.java
+++ b/base/tps-tomcat/src/org/dogtagpki/server/tps/rest/TPSCertService.java
@@ -60,8 +60,6 @@ public class TPSCertService extends PKIService implements TPSCertResource {
     @Context
     private HttpServletRequest servletRequest;
 
-    public final static int DEFAULT_SIZE = 20;
-
     public TPSCertService() {
         System.out.println("TPSCertService.<init>()");
     }
@@ -114,10 +112,14 @@ public class TPSCertService extends PKIService implements TPSCertResource {
 
         System.out.println("TPSCertService.findCerts()");
 
+        if (filter != null && filter.length() < MIN_FILTER_LENGTH) {
+            throw new BadRequestException("Filter is too short.");
+        }
+
+        start = start == null ? 0 : start;
+        size = size == null ? DEFAULT_SIZE : size;
+
         try {
-            start = start == null ? 0 : start;
-            size = size == null ? DEFAULT_SIZE : size;
-
             TPSSubsystem subsystem = (TPSSubsystem)CMS.getSubsystem(TPSSubsystem.ID);
             TPSCertDatabase database = subsystem.getCertDatabase();
 
diff --git a/base/tps-tomcat/src/org/dogtagpki/server/tps/rest/TokenService.java b/base/tps-tomcat/src/org/dogtagpki/server/tps/rest/TokenService.java
index dd3fc72c123e3ee84cb2a86cd27ce254fb94e91d..e64328fc79d92b3bc5a175ebc8d97b6540f9c670 100644
--- a/base/tps-tomcat/src/org/dogtagpki/server/tps/rest/TokenService.java
+++ b/base/tps-tomcat/src/org/dogtagpki/server/tps/rest/TokenService.java
@@ -66,8 +66,6 @@ public class TokenService extends PKIService implements TokenResource {
     @Context
     private HttpServletRequest servletRequest;
 
-    public final static int DEFAULT_SIZE = 20;
-
     public Map<TokenStatus, Collection<TokenStatus>> transitions = new HashMap<TokenStatus, Collection<TokenStatus>>();
 
     public TokenService() throws Exception {
@@ -202,10 +200,14 @@ public class TokenService extends PKIService implements TokenResource {
 
         CMS.debug("TokenService.findTokens()");
 
+        if (filter != null && filter.length() < MIN_FILTER_LENGTH) {
+            throw new BadRequestException("Filter is too short.");
+        }
+
+        start = start == null ? 0 : start;
+        size = size == null ? DEFAULT_SIZE : size;
+
         try {
-            start = start == null ? 0 : start;
-            size = size == null ? DEFAULT_SIZE : size;
-
             TPSSubsystem subsystem = (TPSSubsystem)CMS.getSubsystem(TPSSubsystem.ID);
             TokenDatabase database = subsystem.getTokenDatabase();
 
-- 
1.8.4.2

