Red Hat Web Application Framework 6.1: WAF Developer Guide | ||
---|---|---|
Prev | Introduction to the WAF Developer Guide | Next |
In addition to the standard document conventions covered in Section 2 Document Conventions, there are some additional conventions related specifically to discussing source code:
This is the name of a class in an object-oriented (OO) programming language. For example, the class com.arsdigita.categorization.CategoryTreeNode.
This is the name of a method in an OO programming language, e.g. the method getBaseDataObjectType.
The name of a function or subroutine, as in a programming language. For example, the function SecurityLogger.warn().
The name of a variable. For example, the variable BASE_DATA_OBJECT_TYPE.
An option for a software command or Method. For example, a user has been granted read privileges on an object.
The value returned by a function. For example, a method returns null.
Content that may, must or will be replaced by the user or a program. For example, the code is commented with NOTE(n), where n is the number of the NOTE.
A literal listing of all or part of a program. The \ character is used to break a line for printing purposes. You will want to reconnect them back into a single line, preserving the spacing in the line.
import com.arsdigita.kernel.permissions.PermissionService; import com.arsdigita.kernel.permissions.PermissionDescriptor; import com.arsdigita.kernel.permissions.PrivilegeDescriptor; import com.arsdigita.persistence.OID; OID acsObject = new OID("example.MyACSObject", new BigDecimal(50)); OID party = new OID("com.arsdigita.kernel.Group", new BigDecimal(5)); PermissionDescriptor perm = new PermissionDescriptor(PrivilegeDescriptor.READ, acsObject, party); PermissionService.grantPermission(perm); |
The first occurrence of a term, such as the first time we introduce a bulletin-board and note its abbreviated form, bboard.