CSApplication Class Content Studio 5.7 SDK
Content Studio Web Content Management System

[This is preliminary documentation and is subject to change.]

This class handles application wide data in Content Studio
Inheritance Hierarchy

SystemObject
  SystemMarshalByRefObject
    ContentStudioCSBase
      ContentStudioCSApplication

Namespace: ContentStudio
Assembly: CSServer5 (in CSServer5.dll) Version: 5.7.5016.0 (5.7.5016.0)
Syntax

public class CSApplication : CSBase

The CSApplication type exposes the following members.

Constructors

  NameDescription
Public methodCSApplication
Initializes a new instance of the CSApplication class
Top
Properties

  NameDescription
Public propertyGetVersion
Returns the version information for this instance of Content Studio server.
Public propertyGetVersionBuild
Returns the build part of the version
Public propertyGetVersionMajor
Returns the major part of the version
Public propertyGetVersionMinor
Returns the minor part of the version
Top
Methods

  NameDescription
Public methodCreateObjRef (Inherited from MarshalByRefObject.)
Public methodEquals (Inherited from Object.)
Public methodCode exampleFetchInfo
Returns a configurable collection of information about this instance of Content Studio
Protected methodFinalize (Inherited from Object.)
Public methodGetDbSizeInformation
Gets the size of the current Content Studio database.
Public methodGetDocumentStatistics
Gets the document statistics for a specific web site. This statistic includes the
  • The total number of documents.
  • The number of published (live) documents.
  • The number of archived documents.
  • The number of not published documents (including the ones in the recycling bin).
  • The number of not classified documents
Public methodGetHashCode (Inherited from Object.)
Public methodGetLifetimeService (Inherited from MarshalByRefObject.)
Public methodGetMEUIStructure
Gets information about the structure of subfolders and their files in the Content Studio Modern Editor User Interface application.

This method was added in Content Studio version 5.7.

Public methodGetNamedMEUIResource
Gets a named file resource of a Content Studio server Modern User Interface installation.

This method was added in Content Studio version 5.7.

Public methodGetNamedServerResource
Gets a named file resource of a Content Studio server installation.

This method was added in Content Studio version 5.3.

Public methodGetNamedSiteResource
Gets a named file resource of a Content Studio web site.

This method was added in Content Studio version 5.3.

Public methodGetServerResource
Gets a specific Content Studio server resource.

This method was added in Content Studio version 5.3.

Public methodGetServerStructure
Gets information about the structure of subfolders and their files in the Content Studio server application.

This method was added in Content Studio version 5.3.

Public methodGetSiteStructure
Gets information about the structure of subfolders and their files in a Content Studio site, for example the ~js folder that contains global script files - or the string representation of the XmlSchema that describes the returned xml. The method returns information about folders, subfolder and files that are not stored within Content Studio and for that reason cannot be obtained with any of the regular API:s.

This method was added in Content Studio version 5.3.

Public methodGetType (Inherited from Object.)
Public methodInitializeLifetimeService (Inherited from MarshalByRefObject.)
Public methodIsAlive
Returns true on calls. This method can be used for communication tests.
Public methodIsSlaveInstallMode
Returns true if this CS installation is in the slave mode.
Protected methodMemberwiseClone (Inherited from Object.)
Protected methodMemberwiseClone(Boolean) (Inherited from MarshalByRefObject.)
Public methodRestartSite(ConnectionId, SessionId)
Restarts the website.
Public methodRestartSite(ConnectionId, SessionId, Int32, String)
Restarts the website.
Public methodSimpleSiteList
Returns a simple list of sites registered on the server. This list only contains the ConnectionId and is intended for the Service Manager only.
Public methodSiteList
Gets a list of all sites registered in certain installation of Content Studio
Public methodCode exampleSiteList(Boolean)
Gets a list of all sites registered in certain installation of Content Studio.
Public methodSiteListStream
Gets a list of all sites registered in certain installation of Content Studio. The returned stream can be used as input to an XmlTextReader or an XmlDocument.
Public methodCode exampleSiteListStream(Boolean)
Gets a list of all sites registered in certain installation of Content Studio. The returned stream can be used as input to an XmlTextReader or an XMLDocument.
Public methodToString (Inherited from Object.)
Public methodTranslateMessage(Int32, CSApplicationSupportedLanguages)
Translates a Content Studio message id to its textual representation in a certain language.
Public methodTranslateMessage(CSException, CSApplicationSupportedLanguages)
Translates a Content Studio message id to its textual representation in a certain language.
Public methodTranslateMessage(Int32, CSApplicationSupportedLanguages, String)
Translates a Content Studio message id to its textual representation in a certain language.
Public methodTranslateMessage(String, Int32, String)
Translates a Content Studio message id to its textual representation in a certain language.
Public methodTranslateMessage(Int32, CSApplicationSupportedLanguages, Int32, String)
Translates a Content Studio message id to its textual representation in a certain language.
Public methodTranslateMessage(CSException, CSApplicationSupportedLanguages, Int32, String)
Translates a Content Studio message id to its textual representation in a certain language.
Public methodTranslateMessage(Int32, CSApplicationSupportedLanguages, String, Int32, String)
Translates a Content Studio message id to its textual representation in a certain language.
Top
Fields

  NameDescription
Public fieldStatic memberMaxActiveSessionsForExpressEdition
Gets the maximum number of simultaneous user sessions that are allowed in Content Studio Express Edition
Public fieldStatic memberMaxDatabaseSizeForExpressEdition
Gets (in KB) the maximum allowed database space used for a site in Content Studio Express Edition.
Top
Examples

This small sample shows how you can use the SiteListStream(Boolean) method of the CSApplication class to obtain a list of sites registered in Content Studio.
The sample uses remoting configuration technique to enable the application to call CS API remotely.
This is technique has been documented in the article Calling Content Studio API externally in the Content Studio SDK.

using System;
using System.Runtime.Remoting;
using ContentStudio;
namespace RemConfig
{
    class Program
    {
        static void Main(string[] args)
        {
            try
            {
                //Configure the Remoting client channels by using the configuration file
                RemotingConfiguration.Configure("RemConfig.exe.config", true);
                //Get a list of all registered sites in content studio
                CSApplication csApp = new CSApplication();
                using (System.Xml.XmlReader xrd = System.Xml.XmlReader.Create(csApp.SiteListStream(true)))
                {
                    Console.WriteLine("Id\tName\t");
                    while (xrd.Read())
                    {
                        if (xrd.NodeType != System.Xml.XmlNodeType.Element)
                            continue;
                        if (xrd.Name == "cs_site")
                        {
                            Console.Write(xrd.GetAttribute("connectionid"));
                            Console.Write("\t");
                            Console.Write(xrd.GetAttribute("sitename"));
                            Console.WriteLine();
                        }
                    }
                    xrd.Close();
                }
            }
            catch (RemotingException rex)
            {
                Console.WriteLine("ERROR: There is a problem with your remoting configuration!");
                Console.WriteLine(rex.Message);
            }
            catch (Exception ex)
            {
                Console.WriteLine("ERROR: There was problem with the call!");
                Console.WriteLine(ex.Message);
            }
            Console.Read();
        }
    }
}
See Also

Reference