PluginSchemaImpl.java revision 083ce1f7c46d83d177124cf39bf2e25b15c70745
/**
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
*
* Copyright (c) 2005 Sun Microsystems Inc. All Rights Reserved
*
* The contents of this file are subject to the terms
* of the Common Development and Distribution License
* (the License). You may not use this file except in
* compliance with the License.
*
* You can obtain a copy of the License at
* See the License for the specific language governing
* permission and limitations under the License.
*
* When distributing Covered Code, include this CDDL
* Header Notice in each file and include the License file
* at opensso/legal/CDDLv1.0.txt.
* If applicable, add the following below the CDDL Header,
* with the fields enclosed by brackets [] replaced by
* your own identifying information:
* "Portions Copyrighted [year] [name of copyright owner]"
*
* $Id: PluginSchemaImpl.java,v 1.5 2008/07/11 01:46:20 arviranga Exp $
*
* Portions Copyrighted 2011-2016 ForgeRock AS.
*/
/**
* The class <code>PluginSchemaImpl</code> provides the interfaces to obtain
* the schema information of a plugin that is configured for a service.
*/
protected String interfaceName;
protected String resourceBundleURL;
protected String i18nFileName;
protected String viewBeanURL;
protected String schemaDocument;
PluginSchemaImpl() {
// do nothing
}
throws SMSException {
this.serviceName = serviceName;
this.name = pluginName;
this.interfaceName = interfaceName;
// Construct the DN and get CachedSMSEntry
try {
+ orgName);
}
} catch (SSOException ssoe) {
}
// Try to get the SMSEntry for base DN
try {
}
} catch (SSOException ssoe) {
}
}
smsEntry.addServiceListener(this);
attrSchemas = new HashMap();
update();
}
return (name);
}
String getVersion() {
return (version);
}
return (interfaceName);
}
String getClassName() {
return (iclass);
}
return (jarURL);
}
String getI18NJarURL() {
return (resourceBundleURL);
}
return (i18nFileName);
}
return (viewBeanURL);
}
String getI18NKey() {
return (i18nKey);
}
}
}
return (smsEntry);
}
// Gets calls by local changes and also by notifications threads
// Hence synchronized to avoid data corruption
public synchronized void update() {
if (schemaAttrs != null) {
// Construct the XML document and get the plugin node
try {
} catch (SMSException smse) {
return;
}
break;
}
}
}
}
if (pluginNode == null) {
// Plugin Schema might have been removed
attrSchemas = new HashMap();
attrValidators = new HashMap();
return;
}
// Get the named attributes
// Get attribute schemas
} else {
}
}
}
return (null);
}
}
return (av);
}
try {
} catch (SMSException e) {
+ "generate XML document: " + name);
}
return (null);
}
}
// Attributes
}
}
}
if (o instanceof PluginSchemaImpl) {
return (true);
}
}
return (false);
}
// @Override
public int hashCode() {
int hash = 3;
return hash;
}
void clear() {
// Deregister itself from CachedSMSEntry
smsEntry.removeServiceListener(this);
}
}
boolean isValid() {
}
}
throws SMSException {
// Check the cache
// Remove from cache
} else if (!SMSEntry.cacheSMSEntries ||
// Read the attributes
}
return (answer);
}
synchronized (pluginSchemas) {
// Try the cache again, in case another thread added it
if ((answer = (PluginSchemaImpl)
}
}
return (answer);
}
// Clears the cache
static void clearCache() {
synchronized (pluginSchemas) {
}
}
}
new HashMap());
}