13.07.2015 Views

Using the Caché %Installer Class - InterSystems Documentation

Using the Caché %Installer Class - InterSystems Documentation

Using the Caché %Installer Class - InterSystems Documentation

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Adding Users and Passwords}}<strong>Class</strong>Method setup(ByRef pVars, pLogLevel As %Integer, pInstaller As<strong>%Installer</strong>.Installer) As %Status [ CodeMode = objectgenerator,Internal ]{#; Let XGL document generate code for this method.Quit ##class(<strong>%Installer</strong>.Manifest).%Generate(%compiledclass,%code, "MyInstall")}Important:The %occInclude include file, which includes methods required by <strong>the</strong> <strong>%Installer</strong> class, must be specifiedat <strong>the</strong> beginning of every <strong>%Installer</strong> class you create.The name of <strong>the</strong> XData block (MyInstall) is used by <strong>the</strong> MyPackage.MyInstaller.setup method to generate <strong>the</strong> code forthat manifest, which is passed as <strong>the</strong> third argument of <strong>the</strong> <strong>%Installer</strong>.Manifest.%Generate() method.Note:Referencing XMLNamespace = INSTALLER provides Studio Assist capability while authoring your <strong>%Installer</strong>class.The outer-most xml tag, , contains all <strong>the</strong> information for code generation. There can be as many tags as needed within <strong>the</strong> tag to define namespaces in <strong>the</strong> manifest.A tag, which is located inside a tag, is required only if databases and/or mappingsare being defined. There must be as many tags within <strong>the</strong> tag as are needed to define<strong>the</strong> namespace. In addition, following each tag, you can add , ,and tags as required. The tag activates <strong>the</strong> defined mappings.Within <strong>the</strong> context of a tag — after <strong>the</strong> databases and <strong>the</strong>ir mappings have been defined — globals can beloaded, and routines and classes can be loaded and compiled using tag. <strong>Class</strong> methods can be invoked using<strong>the</strong> tag. Invoked class methods can execute routines and access globals that have been imported.Optionally, you can define variable pairs with <strong>the</strong> tag; each variable must specify a name and value. When <strong>the</strong> valuefor <strong>the</strong> is needed, <strong>the</strong> name is referenced by <strong>the</strong> ${NameAssigned} syntax.2 Adding Users and PasswordsYou can add users (including <strong>the</strong>ir roles and passwords) with <strong>the</strong> System Management Portal, or you can use <strong>the</strong> Security.Usersclass on a staging instance of <strong>Caché</strong> or Ensemble as follows:1. Export <strong>the</strong> user information by using <strong>the</strong> Security.Users.Export() method.2. Import <strong>the</strong> user information by adding <strong>the</strong> following at <strong>the</strong> beginning of your <strong>%Installer</strong> class (in <strong>the</strong> %SYS namespace):where PathToExportedUserInformation is <strong>the</strong> location of <strong>the</strong> output file specified in <strong>the</strong> Security.Users.Export()method.3 <strong>%Installer</strong> TagsFollowing are descriptions of <strong>the</strong> tags (in alphabetical order) you can use in your <strong>%Installer</strong> class.Note:Values shown in italics are <strong>the</strong> defaults used if <strong>the</strong> setting is not specified explicitly.2 <strong>Using</strong> <strong>the</strong> <strong>Caché</strong> <strong>%Installer</strong> <strong>Class</strong>

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!