/**
* 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: MAPCreateDeviceModelImpl.java,v 1.2 2008/06/25 05:43:18 qcheng Exp $
*
*/
/* - LOG COMPLETE - */
public class MAPCreateDeviceModelImpl
extends MAPModelBase
implements MAPCreateDeviceModel
{
}
/**
* Returns the XML for create device property sheet.
*
* @param clientType Name of Client Type.
* @param style Name of Style.
* @throws AMConsoleException if there are no attributes to display.
* @return XML for create device property sheet.
*/
throws AMConsoleException
{
try {
serviceName, this, createDeviceReqAttrs);
} catch (SMSException e) {
"MAPCreateDeviceModelImpl.getCreateDevicePropertyXML", e);
} catch (SSOException e) {
"MAPCreateDeviceModelImpl.getCreateDevicePropertyXML", e);
}
}
return xml;
}
/**
* Returns a set of attriute names for device creation.
*
* @return a set of attriute names for device creation.
*/
}
return names;
}
/**
* Returns a map of attribute name to its default values.
*
* @return a map of attribute name to its default values.
*/
return createDeviceDefaultValues;
}
private void getCreateDeviceDefaultValues(
) {
} else {
as.getDefaultValues());
}
}
}
) {
}
}
}
}
}
}
}
return attributeSchemas;
}
}
}
}
}
return as;
}
/**
* Create new device.
*
* @param attrValues Attribute Values for the new device.
* @throws AMConsoleException if device cannot be created.
*/
throws AMConsoleException {
try {
} catch (AMConsoleException e) {
logEvent("INVALID_CLIENT_TYPE_CLIENT_DETECTION_CREATE_CLIENT",
paramsEx);
throw e;
} catch (AMClientCapException e) {
logEvent("CLIENT_SDK_EXCEPTION_CLIENT_DETECTION_CREATE_CLIENT",
paramsEx);
throw new AMConsoleException(strError);
}
}
throws AMConsoleException {
// Check if client exists in internal library before adding the client
throw new AMConsoleException(msg);
}
if (!isClientTypeValid(clientType)) {
throw new AMConsoleException(
getLocalizedString("mapInvalidClientType.message"));
}
}
/**
* Clones a device.
*
* @param origClientType Original Client Type.
* @param clientType Client Type.
* @param deviceName Device Name.
* @throws AMConsoleException if device cannot be clone
*/
public void cloneDevice(
) throws AMConsoleException {
throw new AMConsoleException(
getLocalizedString("mapCloneFailed.message"));
}
try {
} catch (AMConsoleException e) {
logEvent("INVALID_CLIENT_TYPE_CLIENT_DETECTION_CREATE_CLIENT",
paramsEx);
throw e;
} catch (AMClientCapException e) {
logEvent("CLIENT_SDK_EXCEPTION_CLIENT_DETECTION_CREATE_CLIENT",
paramsEx);
throw new AMConsoleException(strError);
}
}
}
}
return merged;
}
}