Справочник Пользователя для Red Hat Web Application Framework 6.1

Скачать
Страница из 230
iv
Introduction to the WAF Developer Guide
Warning
Be careful to remove only the necessary Red Hat Applications partitions. Removing other partitions
could result in data loss or a corrupted system environment.
3. Code Presentation Conventions
In addition to the standard document conventions covered in Section 2 Document Conventions, there
are some additional conventions related specifically to discussing source code:
classname
This is the name of a class in an object-oriented (OO) programming language. For example, the
class
com.arsdigita.categorization.CategoryTreeNode
.
method name
This is the name of a method in an OO programming language, e.g. the method
getBase-
DataObjectType
.
function
The name of a function or subroutine, as in a programming language. For example, the function
SecurityLogger.warn()
.
variable name
The name of a variable. For example, the variable
BASE_DATA_OBJECT_TYPE
.
option
An option for a software command or
Method
. For example, a user has been granted
read
privileges on an object.
return value
The value returned by a function. For example, a method returns null.
replaceable
Content that may, must or will be replaced by the user or a program. For example, the code is
commented with
NOTE(n)
, where is the number of the
NOTE
.
program listing
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));