/**
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
*
* Copyright (c) 2008 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: MigrateFromInstallState.java,v 1.2 2008/06/25 05:51:22 qcheng Exp $
*
*/
/**
* Class that encapuslates the state of an install instance. It provides
* functionality to read instance specific data or global data.
*
*/
/**
* Creates a new InstallState object. One of the following cases may
* apply:-
* If no instances are configured corresponding to the given keyValuePairs,
* then an InstallState object containing the input instance
* (keyValuePairs) data (supplied map) will be returned. If a configured
* instance is found associated with keyValuePairs supplied, then an
* InstallState object containing the corresponding instance data and
* global data is returned. If none of the configured instances correspond
* to the given keyValuePairs then an InstallState object with just the
* global data is returned.
*
* @param keyValuePairs
* a Map containing key value pairs that should be used to look
* up for the associated instance.
* @param keysToUse
* A set of keys that should be only used to form a unique key.
*/
throws InstallException {
// Load old product's install data.
if (!MigrateFromInstallDataStore.isExistingStore()) {
"No existing data store was found. " +
"Creating state with Instance Finder data.");
} else {
"Creating state.");
// Existing install state (global & may be instance state too)
}
}
/**
* get StateAccess saved.
* @return PersistentStateAccess saved
*/
return pStateAccess;
}
/**
* Returns the name of the instance associated with this InstallState
*
* @return the instance name
*/
return instanceName;
}
/*
* initialized InstallState from install data saved in file.
*/
throws InstallException {
// Retrieve Global data copy (not reference)
// Retrieve copy of instance data (not reference)
if (instanceData == null) {
"No instance data found for instance " + instanceName);
// New Instance
} else {
// Already Configured Instance
"Instance data found for instance: " + instanceName);
}
}
return MigrateFromInstFinderStore.getInstance();
}
throws InstallException {
}
}
instanceName = name;
}
}