Debian Codegraph @

ssl-proxies/src/main/java/org/globus/gsi/stores/ResourceProxyCredentialStore.java

raw
1 /*
2 * Copyright 1999-2010 University of Chicago
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
5 * compliance with the License. You may obtain a copy of the License at
6 *
7 * http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * Unless required by applicable law or agreed to in writing, software distributed under the License is
10 * distributed on an "AS IS" BASIS,WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
11 * express or implied.
12 *
13 * See the License for the specific language governing permissions and limitations under the License.
14 */
15
16 package org.globus.gsi.stores;
17
18 import org.globus.gsi.X509Credential;
19
20 import org.apache.commons.logging.LogFactory;
21
22 import org.apache.commons.logging.Log;
23
24 import java.io.File;
25 import java.io.FilenameFilter;
26
27 import org.globus.util.GlobusResource;
28
29 /**
30 * Created by IntelliJ IDEA. User: turtlebender Date: Dec 29, 2009 Time:
31 * 12:53:02 PM To change this template use File | Settings | File Templates.
32 */
33 public class ResourceProxyCredentialStore extends
34 ResourceSecurityWrapperStore<ResourceProxyCredential, X509Credential> {
35
36 private static FilenameFilter filter = new ProxyFilenameFilter();
37 private Log logger = LogFactory.getLog(getClass().getCanonicalName());
38
39 @Override
40 public ResourceProxyCredential create(GlobusResource globusResource)
41 throws ResourceStoreException {
42 return new ResourceProxyCredential(globusResource);
43 }
44
45 @Override
46 protected Log getLog() {
47 return logger;
48 }
49
50 @Override
51 public FilenameFilter getDefaultFilenameFilter() {
52 return ResourceProxyCredentialStore.filter;
53 }
54
55 /**
56 * This filename filter returns files whose names are valid for a Proxy
57 * Certificate.
58 */
59 public static class ProxyFilenameFilter implements FilenameFilter {
60 public boolean accept(File file, String s) {
61 return true;
62 }
63 }
64 }