## ============================================================================ ## Filename : WebPermissionsTemplate.vm ## Note(s) : This template is used to generate a Permissions Java class. ## ## Note: The generated code is dependent on the ThinkUI framework. ## Please refer to the SQL Client documentation for details. ## ## Copyright (c) 2007 ThinkUI Software Inc. All rights reserved. ## ============================================================================ ## ## **************************************************************************** ## The following variables are available in this template. For more ## information on any of the following variable, please refer to the user guide. ## **************************************************************************** ## $projectName ## $authorName ## $headerText ## $className ## $packageName ## $subPackageName ## $prjPkgName ## $prjClassPrefix ## $superClassName ## $date ## $codeGen ## #if ($packageName) package $packageName; #end #parse( "ClassHeaderInclude.vm" ) import java.util.HashSet; import ${subPackageName}.objects.ApplicationRole; import thinkui.security.DefaultApplicationPermission; /** * Defines the permissions for the $prjClassPrefix application. */ public class ${className} { public static final DefaultApplicationPermission ADMINISTRATOR_ROLE = new DefaultApplicationPermission("Administrator role"); /** * ${className} constructor. */ private ${className}() { // Empty. } static { java.util.Set roles; roles = new HashSet(); roles.add(ApplicationRole.ADMINISTRATOR_ROLE_NAME); ADMINISTRATOR_ROLE.setRoles(roles); ADMINISTRATOR_ROLE.setAuthenticationRequired(true); } }