13.07.2015 Views

Using Caché Studio - InterSystems Documentation

Using Caché Studio - InterSystems Documentation

Using Caché Studio - InterSystems Documentation

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>Using</strong> <strong>Studio</strong> Source Control Hooks6. Click Source Control —> Check Out and then click Yes. You can now edit the <strong>Caché</strong> document.7. Click Source Control —> Check In and then click Yes. The <strong>Caché</strong> document is now read-onlyagain.Other menu items on the Source Control menu do nothing, because the sample implements only theCheck In and Check Out methods.A.5.2 GlobalThe <strong>Studio</strong>.SourceControl.Example sample uses a global to record any needed persistent information.Methods in this class maintain and use the ^MySourceControl global, which has the followingstructure:Node^MySourceControl("base")^MySourceControl(0,IntName), where IntNameis the internal name of a <strong>Caché</strong> file^MySourceControl(1,IntName)^MySourceControl(2,IntName)ContentsThe absolute path of the directorythat will store the XML files. Thedefault is C:\sources\The date and time when thecorresponding external file was lastmodifiedThe date and time when this <strong>Caché</strong>document was last modifiedThe name of the user who has this<strong>Caché</strong> document checked out, ifanyThis global is purely a sample and is used only by this class.A.5.3 Determining the External NamesIf you enable the <strong>Studio</strong>.SourceControl.Example class, it maintains external XML files that correspondto any <strong>Caché</strong> document that you load or create. It writes these files to the directory C:\sources\ bydefault, as described in “Deciding How to Map Internal and External Names.” For example, theexternal name for the class MyApp.Addresses.HomeAddress isC:\sources\cls\MyApp\Addresses/HomeAddress.xml.Within the sample, the ExternalName method determines the external file name for any <strong>Caché</strong> document.This method is as follows:142 <strong>Using</strong> <strong>Caché</strong> <strong>Studio</strong>

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

Saved successfully!

Ooh no, something went wrong!