/*
Solaris Application Schema
Copyright (c) 2002 Sun Microsystems, Inc. All Rights Reserved.
*/

#pragma Locale ("en_US")

//======================================================================
// Solaris_SoftwareElement
//=======================================================================
   [Abstract, 
    Description ("Solaris_SoftwareElement is an abstract class from which "
    "classes that fit into a SoftwareElement and/or Software_Package "
    "structure are derived."), Version("1.2.0")]
class Solaris_SoftwareElement : CIM_SoftwareElement
{
};

[provider("java:com.sun.wbem.solarisprovider.packaging.Solaris_Package"), 
 Description ("Solaris is distributed as a series of packages, "
 	    "containers of files such as Java class files and " 
	    "graphics files that form the basis of applications."
	    " Packages can be installed or removed individually."
            " Dependency between packages is stored as part of "
	    "the package format. Full products and third-party "
	    "software, such as device drivers, can be delivered"
	    " as packages. Packages enable software to be "
	    "installed and removed using a standard mechanism."),
 Version("1.2.0")
]
class Solaris_Package:Solaris_SoftwareElement
{

    [Description("The Category is a free-form string. It normally contains"
		" either 'system' or 'application'. It can also take an"
		" additional value separated by a comma. Values include"
		" ALE, graphics, java, video, JFP, SyMON."
		" This is the CATEGORY field reported by pkginfo.")
    ]
    string Category ;

    [read,
     Description("The Architecture indicates what system architecture " 
		"the package applies to. A generic text package, such "
		"as header files or man pages, may have an architecture"
		" of 'all'. Binaries are specific to a processor type"
		" such as 'sparc' or 'i386'. Kernel packages are for"
		" a subclass of the processor type, such as 'sparc.sun4u'"
		" This is the ARCH field reported by pkginfo")
    ]
    string Architecture ;

    [read, 
     Description("The Base Dir indicates the top level where the package"
		" was installed. It is a valid UNIX path. This is the "
		"BASEDIR field reported by pkginfo")
    ]
    string BaseDir ;

    [Description("SupportInfo gives information about who to contact "
		"for support. This is the HOTLINE field reported by pkginfo")
    ]
    string SupportInfo ;
};


//======================================================================
// Solaris_Patch
//=======================================================================
[Provider("java:com.sun.wbem.solarisprovider.patch.Solaris_Patch"),
 Description ("Software updates are normally issued in the form"
                " of a 'patch'. Like packages, patches can be added "
                "and removed, and their status queried. There is a lot"
                " of information available when a patch is installed,"
                " but that information doesn't seem to be stored in "
                "the system. The only information that is stored is "
                "the patch ID, the packages to which the patch "
                "applies, and a list of patches that are required by,"
                "incompatible with, or obsoleted by this patch."),
 Version("1.3.0")
]
class Solaris_Patch : Solaris_SoftwareElement
{

    [Description("Obsoletes are the patches that are rendered obsolete "
                "or are accumulated into this patch.")]
    string Obsoletes[];

    [Description("Requires are the patches that are required in order "
                "for this patch to work. This patch usually cannot "
                "be accumulated into the required patch because it "
                "applies to an optional module.")]
    string Requires[];

    [Description("Incompatibles are patches that conflict "
                "with this patch for any reason.")]
    string Incompatibles[];

    [Description("The list of packages that this patch patches.")]
    string Packages[];

    [Description("The absolute path name to the directory that contains this "
                "spooled patch. /var/sadm/spool/patch is an example "
                "of a  patch_dir.")]
    string PatchDirectoryName;
    
    [Description("Backs up the files to be patched if boolean is set "
                "to true(default).")]
    boolean BackUpFiles=true;

    [Description("Installs unconditionally, turns off file validation."
                "Applies the patch even if some of the files to be patched "
                "have been modified since their original installation.")]
    boolean UnconditionalInstall=false;

    [Description("Saves backout data to a directory other than the package "
                "database. Specify BackoutDirectory as an absolute "
                "path name.")]
    string BackoutDirectory;

    [Description("Specifies the system's architecture relating to "
	"this patch.")]
    string Architecture;

    [Description("The patch Solaris release.")]
    string PatchSolarisRelease;

    [Description("The patch SunOS release.")]
    string PatchSunOSRelease;

    [Description("The patch release date.")]
    datetime ReleaseDate;

    [Description("Patch is recommended to be installed in single user mode.")]
    boolean SingleUserRecommended = false;

    [Description("Patch is required to be installed in single user mode.")]
    boolean SingleUserRequired = false;
        
    [Description("Used to indicate that a reboot is required in "
                 "order to enable the functionality delivered by the patch.")]
    boolean RebootAfter = false;

    [Description("Used to indicate a reboot is required after the "
                 "patch is installed in order to ensure reliable system "
                 "behavior.")]
    boolean RebootImmediate = false;

    [Description("Used to indicate that a reconfiguration reboot "
                 "is required in order to enable the functionality "
                 "delivered by the patch.")]
    boolean ReconfigAfter = false;

    [Description("Used to indicate a reconfiguration reboot is "
                 "required after the patch is installed in order "
                 "to ensure reliable system behavior.")]
    boolean ReconfigImmediate = false;

    [Description("a patch produced quickly and without adequate "
                 "integration testing such that its behaviors are "
                 "certain to require backout once the corresponding " 
                 "accumulating patch has been delivered.")]
    boolean RestrictedPatch = false;

    [Description("This method retrieves the patch ids in a patch spooled "
                 "directory and bulks the patch data in a Vector of Strings "
                 "delimited by ~.")]
    sint32 GetSpooledPatchInfo([IN] string patchSpoolDir,
                               [OUT] string patchData[]);

    [Description("This method retrieves a spooled patch's README file.")]
    sint32 GetSpooledPatchReadme([IN] string patchSpoolDir,
                                 [IN] string patchId,
                                 [OUT] string readme);

    [Description("This method downloads the specified patchList to the "
                 "downloadDir in standard package format.")]
    sint32 DownloadPatches([IN] string patchList[],
                           [IN] string downloadDir,
			   [OUT] string requiredPatchList[],
			   [OUT] string patchesNotDownloaded[]);

    [Description("This method downloads the specified patchList to the "
                 "downloadDir in signed jar file format.")]
    sint32 DownloadPatchesInJarFormat([IN] string patchList[],
                           [IN] string downloadDir,
			   [OUT] string requiredPatchList[],
			   [OUT] string patchesNotDownloaded[]);

    [Description("This method assesses the needed patches on a target host. "
                "patchList is this analyzed output and synopsis is the "
                "corresponding patch description.")]
    sint32 AssessNeededPatches([OUT] string patchList[],
                               [OUT] string synopsis[]);
     
     [Description("This method installs the specified patchList on the target "
                "host from the specified directory. The patches are installed"
                "following the user specified installation policy. ")]
     sint32 InstallPatchesByPolicy([IN] string patchList[],
                                [IN] string spoolDir,
                                [OUT, IN(False)] string installationStatus[]);
};

//======================================================================
// Solaris_SoftwareElementDependency
//=======================================================================
[Association, Abstract,
 Description ("Solaris_SoftwareElementDependency is an abstract class from "
	"which Solaris_SoftwareElementDependency are derived."),
 Version("1.2.0") ]
class Solaris_SoftwareElementDependency : CIM_Dependency
{
    [Override ("Antecedent")]
    Solaris_SoftwareElement REF Antecedent;

    [Override ("Dependent")]
    Solaris_SoftwareElement REF Dependent;
};


//======================================================================
// Solaris_PatchPackageDependency
//=======================================================================
[Association, 
 Provider("com.sun.wbem.solarisprovider.patch.Solaris_PatchPackageDependency"),
 Version("1.2.0")]
class Solaris_PatchPackageDependency : Solaris_SoftwareElementDependency
{
    [Override ("Antecedent"), Description ("")]
    Solaris_Package REF Antecedent;
    [Override ("Dependent"), Description ("")]
    Solaris_Patch REF Dependent;

    [Description ("This associated patch's backout directory")]
    string PatchBackoutDir;
};


//======================================================================
// Solaris_PatchToPatchDependency
//=======================================================================
[Association, 
 Provider("com.sun.wbem.solarisprovider.patch.Solaris_PatchToPatchDependency"),
 Version("1.2.0")]
class Solaris_PatchToPatchDependency : Solaris_SoftwareElementDependency
{
    [Override ("Antecedent")]
    Solaris_Patch REF Antecedent;
    [Override ("Dependent")]
    Solaris_Patch REF Dependent;
    [Description("This value describes the relation of the required patch to"
        "the dependent patch."), ValueMap {"0", "1", "2"},
         Values {"Required", "Obsoletes", "Incompatible"}]
    uint16 PatchDependencyRelation;
};


[Provider("java:com.sun.wbem.solarisprovider.productregistry.Solaris_SoftwareFeature"), Version("1.2.0")]
class Solaris_SoftwareFeature : CIM_SoftwareFeature
{
	// if we have instance number, it'll have to be concatenated
	// to version internally.
	
	uint32 InstanceNumber; 
	string BackwardCompatible[];
	string InstalledLocation;
	string DisplayedName;

	// Info about any component this might be dependent on
	//string DependsOnID[];
	//string DependsOnVersion[];
	string ParentID;
	
    string Keys[];
    
    string Values[];
};

[Association,
 Provider("java:com.sun.wbem.solarisprovider.productregistry.Solaris_ProductSoftwareFeatures"), Version("1.2.0")
]
class Solaris_ProductSoftwareFeatures : CIM_ProductSoftwareFeatures
{
    [override("Product"),
     Min (1),
     Max(1)
    ]
    Solaris_Product REF Product;

    [override("Component"),
     Min(0),
     Max(NULL),
     Weak
    ]
    Solaris_SoftwareFeature REF Feature;
};


  [Provider("java:com.sun.wbem.solarisprovider.productregistry.Solaris_RegistrySoftwareElement"), Version("1.2.0")]
class Solaris_RegistrySoftwareElement : Solaris_SoftwareElement
{
        [Description("InstanceNumber has to be a key if products,features"			" and elements have to look the same - just concatenate it"
		"to version internally.")]
        uint32 InstanceNumber;
		
	[Description("Array of strings indicating versions of Backward "
		"compatibility")]
        string BackwardCompatible[];

	[Description("String indicating location of installed SoftwareElement")]
        string InstalledLocation;

	[Description("String indicating uninstalled location of "
		"installed SoftwareElement")]	
        string Uninstaller;

	[Description("String displaying the tname of the "
		"Software Element installed")]
        string DisplayedName;

	[Description("String displaying the name of the Parent of "
		"the Software Element installed")]
        string ParentID;

	string Keys[];	
    	string Values[];

};

// Provider("java:com.sun.wbem.solarisprovider.productregistry.Solaris_SoftwareElementDependency"),

[Association,
 Provider("java:com.sun.wbem.solarisprovider.productregistry.Solaris_RegistryElementDependency"),
Description ("Solaris_RegistryElementDependency is an abstract class from which "
   "Solaris_RegistrySoftwareElement are derived."), Version("1.2.0")
]
class Solaris_RegistryElementDependency : Solaris_SoftwareElementDependency
{
   	[Override ("Antecedent")]
    Solaris_RegistrySoftwareElement REF Antecedent;
 
	   [Override ("Dependent")]
    Solaris_RegistrySoftwareElement REF Dependent;
};


[Association, 
 Provider("java:com.sun.wbem.solarisprovider.productregistry.Solaris_SoftwareFeatureSoftwareElements"), Version("1.2.0")
]
class Solaris_SoftwareFeatureSoftwareElements : CIM_SoftwareFeatureSoftwareElements
{
    [override("GroupComponent")]
    Solaris_SoftwareFeature REF Feature;

    [override("PartComponent")]
    Solaris_SoftwareElement REF Package;
};

[Association, 
 Provider("java:com.sun.wbem.solarisprovider.productregistry.Solaris_SoftwareFeatureDependency"), Version("1.2.0")
]
class Solaris_SoftwareFeatureDependency 
{
    [Key]
    Solaris_SoftwareFeature REF RequiredFeature;

    [Key]
    Solaris_SoftwareFeature REF DependentFeature;
};
/*
[Association, 
 Provider("java:com.sun.wbem.solarisprovider.productregistry.Solaris_SoftwareElementDependency"), Version("1.2.0")
]
class Solaris_SoftwareElementDependency 
{
    Solaris_SoftwareElement REF RequiredElement;

    Solaris_SoftwareElement REF DependentElement;
};
*/
/*
 *	[Association, 
 *		Provider("java:com.sun.wbem.solarisprovider.common.Solaris")
 *	]
 *
 * class Solaris_SoftwareElementProduct
 * {
 *	Solaris_Product REF RequiredProduct;
 *
 *	Solaris_SoftwareElement REF DependentElement;
 * };
 */

[Provider("java:com.sun.wbem.solarisprovider.assoc.Solaris_InstalledSoftwareElement"),
 Description ("An association linking a Solaris_SoftwareElement"
	    " and the Solaris_ComputerSystem that it is installed on."),
 Version("1.2.0")
]
class Solaris_InstalledSoftwareElement : CIM_InstalledSoftwareElement
{
};


//==================================================================
// Solaris_ProductSoftwareFeatureDependency
//==================================================================
	[Association, 
  	 Provider("java:com.sun.wbem.solarisprovider.productregistry.Solaris_ProductSoftwareFeatureDependency"),
	Version("1.2.0")
	]
class Solaris_ProductSoftwareFeatureDependency
{

	[Key]
	Solaris_Product REF DependentProduct;

	[Key]
	Solaris_SoftwareFeature REF RequiredFeature;
};

//==================================================================
// Solaris_ProductSoftwareElementDependency
//==================================================================
 [Association, 
  Provider("java:com.sun.wbem.solarisprovider.productregistry.Solaris_ProductSoftwareElementDependency"),
  Version("1.2.0")
 ]
class Solaris_ProductSoftwareElementDependency
{
	[Key]
	Solaris_Product REF DependentProduct;

	[Key]
	Solaris_SoftwareElement REF RequiredElement;
};


//==================================================================
// Solaris_SoftwareFeatureSoftwareElementDependency
//==================================================================


[Association, 
 Provider("java:com.sun.wbem.solarisprovider.productregistry.Solaris_SoftwareFeatureSoftwareElementDependency"),
 Version("1.2.0")
]
class Solaris_SoftwareFeatureSoftwareElementDependency
{
	[Key]
	Solaris_SoftwareFeature REF DependentFeature;

	[Key]
	Solaris_SoftwareElement REF RequiredElement;
};


//==================================================================
// Solaris_SoftwareElementProductDependency
//==================================================================
[Association, 
 Provider("java:com.sun.wbem.solarisprovider.productregistry.Solaris_SoftwareElementProductDependency"),
 Version("1.2.0")
]
class Solaris_SoftwareElementProductDependency
{

	[Key]
	Solaris_SoftwareElement REF DependentElement;

	[Key]
	Solaris_Product REF RequiredProduct;
};


//==================================================================
// Solaris_SoftwareElementSoftwareFeatureDependency
//==================================================================


[Association, 
 Provider("java:com.sun.wbem.solarisprovider.productregistry.Solaris_SoftwareElementSoftwareFeatureDependency"),
 Version("1.2.0")
]
class Solaris_SoftwareElementSoftwareFeatureDependency
{
	[Key]
	Solaris_SoftwareElement REF DependentElement;

	[Key]
	Solaris_SoftwareFeature REF RequiredFeature;
};


//==================================================================
// Solaris_ProductSoftwareElement
//==================================================================
[Association, 
 Provider("java:com.sun.wbem.solarisprovider.productregistry.Solaris_ProductSoftwareElements"),
 Version("1.2.0")
 ]
class Solaris_ProductSoftwareElements
{
	[Key]
	Solaris_Product REF Product;

	[Key]
	Solaris_SoftwareElement REF Package;
};

//==================================================================
// Solaris_SoftwareFeatureParentChild
//==================================================================


[Association, 
 Provider("java:com.sun.wbem.solarisprovider.productregistry.Solaris_SoftwareFeatureParentChild"),
 Version("1.2.0")
 ]
class Solaris_SoftwareFeatureParentChild
{
	[Key]
	Solaris_SoftwareFeature REF ParentFeature;

	[Key]
	Solaris_SoftwareFeature REF ChildFeature;
};

[Association,
 Provider("java:com.sun.wbem.solarisprovider.productregistry.Solaris_SoftwareFeatureProductDependency"),
 Version("1.2.0")
 ]
class Solaris_SoftwareFeatureProductDependency
{
	[Key]
        Solaris_SoftwareFeature REF DependentFeature;

	[Key]
        Solaris_Product REF RequiredProduct;
 
};

