/// <summary>
        /// Retrieves the specified application fields from the SSO store.
        /// </summary>
        /// <param name="appName">The name of the application to retrieve.</param>
        /// <returns>The instance of the SSOAppFieldCollection.</returns>
        public static SSOAppFieldCollection GetApplicationFields(string appName)
        {
            SSOAppFieldCollection appFields   = new SSOAppFieldCollection();
            ISSOConfigStore       configStore = new ISSOConfigStore();

            configStore.GetConfigInfo(appName, SSOManager.ConfigIdentifier, SSOFlag.SSO_FLAG_RUNTIME, appFields);
            foreach (SSOAppField field in appFields)
            {
                field.Identifier = SSOManager.ConfigIdentifier;
            }
            return(appFields);
        }
        public static void UpdateApplicationFields(string appName, SSOAppFieldCollection appFields, bool recreate)
        {
            if (recreate == true)
            {
                SSOAppConfig appConfig = new SSOAppConfig()
                {
                    // load the current application metadata information
                    AppInfo = SSOManager.GetApplicationInfo(appName),
                    // and use the application fields provided
                    AppFields = appFields
                };

                // update/recreate the application including the fields
                SSOManager.UpdateApplication(appConfig, true);
            }
            else
            {
                // just update the application fields
                ISSOConfigStore ssoConfigStore = new ISSOConfigStore();
                ssoConfigStore.SetConfigInfo(appName, SSOManager.ConfigIdentifier, appFields);
            }
        }