/**
* 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: ServiceInstanceImpl.java,v 1.6 2008/07/11 01:46:20 arviranga Exp $
*
* Portions Copyrighted 2011-2016 ForgeRock AS.
*/
/**
* The class <code>ServiceInstanceImpl</code> provides methods to get
* service's instance variables.
*/
// Cached SMS entry
// Instance attributes
smsEntry.addServiceListener(this);
} else {
update();
}
}
return (name);
}
return (group);
}
return (uri);
}
}
}
return (smsEntry.getClonedSMSEntry());
}
}
// Gets calls by local changes and also by notifications threads
// Hence synchronized to avoid data corruption
public synchronized void update() {
// Read the attributes
// Get the group attribute
}
// Get the URI
}
}
boolean isValid() {
}
}
void clear() {
smsEntry.removeServiceListener(this);
}
}
// ----------------------------------------------------------
// Protected static methods
// ----------------------------------------------------------
//construct instance DN using default realm
}
if (debug.messageEnabled()) {
}
// Check the cache
// Check if the entry has to be updated
// Since the SMSEntries are not to be cached, read the entry
}
return (answer);
}
// Construct the service instance
synchronized (serviceInstances) {
// Check cache again, in case it was added by another thread
// Still not present in cache, create and add to cache
}
}
if (debug.messageEnabled()) {
}
return (answer);
}
// Clears the cache
static void clearCache() {
synchronized (serviceInstances) {
}
}
}
}
// CachedSMSEntry is invalid. Recreate this instance
}
// Check if the user has permissions
// Check if Principal has permission to read entry
}
}
return (answer);
}
// Construct the DN
// OPENAM-3269
// commenting out since it always construct DN with default realm
// String dn = "ou=" + iName + "," + CreateServiceConfig.INSTANCES_NODE
// + ServiceManager.getServiceNameDN(serviceName, version);
}
if (entry.isNewEntry()) {
"sms-no-such-instance", args));
}
if (sudoPrincipals == null) {
}
return (entry);
}
//DNMapper will map null or empty string to baseDN
}
new HashMap());
new HashMap());
.append("\"")
.append("\"");
.append("\"");
}
.append(">\n");
}
}