SMDiscoveryServiceData.java revision 4a2f0f0be43dfd4c1b490cbf3cc48b6ba6084b1c
/**
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
*
* Copyright (c) 2007 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: SMDiscoveryServiceData.java,v 1.3 2008/06/25 05:49:46 qcheng Exp $
*
*/
/* - NEED NOT LOG - */
/**
* <code>SMDiscoveryServiceData</code> defines a set of methods that
* are required by discovery service.
*/
public class SMDiscoveryServiceData implements Serializable
{
public static final int GLOBAL_ENTRY = 0;
public static final int DYNAMIC_ENTRY = 1;
public static final int USER_RESOURCE_OFFERING_ENTRY = 2;
private int type = GLOBAL_ENTRY;
private boolean resourceOfferingModified = false;
/**
* Returns the handler to the <code>SMDiscoEntryData</code> instance stored
* in this object.
*
* @return handler to the <code>SMDiscoEntryData</code> instance.
*/
public SMDiscoEntryData getSMDiscoEntryDataHandler() {
return smDisco;
}
/**
* Sets the resource offering entry object to the value provided.
*
* @param data <code>SMDiscoEntryData</code>
*/
}
/**
* Returns true if there is an entry for resource offering.
*
* @return true if there is an entry for resource offering.
*/
public boolean hasResources() {
}
/**
* Adds the resource offering entry to the list object.
*
* @param data <code>SMDiscoEntryData</code>
*/
try {
} catch (AMConsoleException e) {
}
}
/**
* Replaces the resource offering entry to the list object.
*
* @param idx Index of element in resource offering list.
* @param data <code>SMDiscoEntryData</code>
*/
throws AMConsoleException {
}
/**
* Returns the list of resource offering.
*
* @return the list of resource offering.
*/
public List getResourceData() {
return discoData;
}
/**
* Stores the global attributes for discovery services in this object.
*
* @param map global attributes and values.
*/
}
/**
* Stores the dynamic attributes for discovery services in this object.
*
* @param map dynamic attributes and values.
*/
}
/**
* Returns the global attributes for discovery service stored in
* this object.
*
* @return the map of global attributes.
*/
return attr;
}
/**
* Returns the dynamic attributes for discovery service stored in
* this object.
*
* @return the map of dynamic attributes.
*/
public Map getDynamicAttr() {
return dynAttr;
}
/**
* Returns true if the flag for global entry is set.
*
* @return true if the flag for global entry is set.
*/
public boolean isUserResourceOffering() {
return type == USER_RESOURCE_OFFERING_ENTRY;
}
/**
* Returns true if the flag for global entry is set.
*
* @return true if the flag for global entry is set.
*/
public int getEntryType() {
return type;
}
/**
* Sets the global entry flag to the value provided. True value indicate
* that it is a global entry.
*
* @param value value to indicate global entry or not.
*/
public void setEntryType(int value) {
}
/**
* Sets the priority to a new value in this object.
*
* @param value priority value.
*/
}
/**
* Returns priority stored in this object.
*
* @return priority stored in this object.
*/
public String getPriority() {
return priority;
}
/**
* Returns true if a resource offering entries has modified.
*
* @return true if a resource offering entries has modified.
*/
public boolean isResourceOfferingModified() {
return resourceOfferingModified;
}
/**
* Sets the resource offering entry flag to a new value in this object.
*
* @param value resource offering entry flag value.
*/
public void setResourceOfferingEntryFlag(boolean value) {
}
/**
* Returns a set resource offering entries.
*
* @return resource offering entries in <code>entry</code>.
*/
public Set getDiscoveryEntries() {
}
}
return discoEntrySet;
}
/**
* Deletes the resource offering entries.
*
* @param array Array of entries to be deleted.
*/
}
}
/**
* Returns resource offering entry stored in the Directory Server.
*
* @param set Set of entry data.
* @return resource offering entry stored in the Directory Server.
*/
throws AMConsoleException {
}
/**
* Returns resource offering entry stored in the Directory Server.
*
* @param set Set of entry data.
* @param type Type of offering entry, global, dynamic or user.
* @return resource offering entry stored in the Directory Server.
*/
throws AMConsoleException {
try {
}
} catch (JAXBException je) {
}
}
return smEntry;
}
private static void setDiscoEntryData(
{
} else {
}
}
} else {
"No description exists in the disco entry");
}
}
/**
* Returns the value of abstract type.
*
* @param discoStr resource offering entry string.
* @return the value of abstract type in the resource offering entry.
*/
) {
}
}
}
}
}
/**
* Returns map of directive entries.
*
* @return map of directive entries.
*/
if (obj instanceof AuthenticateRequesterElement) {
} else if (obj instanceof EncryptResourceIDElement) {
} else if (obj instanceof AuthenticateSessionContextElement) {
} else if (obj instanceof AuthorizeRequesterElement) {
} else if (obj instanceof GenerateBearerTokenElement) {
} else if (obj instanceof SendSingleLogOutElement) {
} else {
}
}
}
return map;
}
private static void setDirectiveData(
{
}
}
}
}