1 // Javascript Action Template 6.1 2 /* 3 * Copyright © [2008-2009] Novell, Inc. All Rights Reserved. 4 * 5 * USE AND REDISTRIBUTION OF THIS WORK IS SUBJECT TO THE DEVELOPER LICENSE AGREEMENT 6 * OR OTHER AGREEMENT THROUGH WHICH NOVELL, INC. MAKES THE WORK AVAILABLE. THIS WORK 7 * MAY NOT BE ADAPTED WITHOUT NOVELL'S PRIOR WRITTEN CONSENT. 8 * 9 * NOVELL PROVIDES THE WORK "AS IS," WITHOUT ANY EXPRESS OR IMPLIED WARRANTY, 10 * INCLUDING WITHOUT LIMITATION THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR 11 * A PARTICULAR PURPOSE, AND NON-INFRINGEMENT. NOVELL, THE AUTHORS OF THE WORK, AND THE 12 * OWNERS OF COPYRIGHT IN THE WORK ARE NOT LIABLE FOR ANY CLAIM, DAMAGES, OR OTHER 13 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT, OR OTHERWISE, ARISING FROM, OUT OF, 14 * OR IN CONNECTION WITH THE WORK OR THE USE OR OTHER DEALINGS IN THE WORK. 15 */ 16 17 // This Action Plugin template guides the creation of Actions to perform 18 // remediation activities from Sentinel. 19 // Refer to the Sentinel Action NDK documentation at 20 // http://developer.novell.com/wiki/index.php/Developer_Home 21 // for complete information about this template, the API, and Sentinel in general. 22 23 /** 24 * @fileoverview 25 * This file contains the main Action control structure. 26 */ 27 28 /** 29 * Note that the loading of any additional .js files has been moved to compile time. 30 * Now all .js files are concatenated together rather than calling load() here each 31 * time thus reducing the use of PermGen memory. 32 */ 33 34 var instance = new Action(); 35 36 if (!instance.initialize()) { 37 log("Action failed to initialize; view recent error messages"); 38 throw "Action failed to initialize"; 39 } 40 41 42 input.get(); 43 input.normalize(); 44 45 if (instance.DO_ACTION) { 46 input.doAction(); 47 } 48 49 instance.cleanup(); 50