프로젝트에서 개요 코드로 작업합니다
사용자 정의 개요 코드는 WBS 코드 또는 개요 번호와 다른 프로젝트 구조를 제공하는 작업 또는 리소스에 대해 정의하는 태그입니다. Java의 Tasks를 사용하면 이러한 개요 코드와 별명, AlllevelsRequired, Enterprise, EnterpriseOutlineCodealias, FieldId, FieldName, Poneticalias, Guid, Masks 및 Values와 같은 속성을 검색 할 수 있습니다.
개요 코드 정의 검색 Project 클래스는 GetoutLineCodes ()를 노출시킨다. ontlinecodedefinition은 다음 샘플 코드에 표시된 모든 세부 사항을 제공합니다.
다음 줄의 코드는 프로젝트의 개요 코드 정보를 검색합니다.
1// For complete examples and data files, please go to https://github.com/aspose-tasks/Aspose.Tasks-for-Java
2Project project = new Project(projectName);
3for (OutlineCodeDefinition ocd : project.getOutlineCodes()) {
4 System.out.println("Alias = " + ocd.getAlias());
5 if (ocd.getAllLevelsRequired()) {
6 System.out.println("It contains property: must have all levels");
7 } else {
8 System.out.println("It does not contain property: must have all levels");
9 }
10 if (ocd.getEnterprise()) {
11 System.out.println("It is an enterprise custom outline code.");
12 } else {
13 System.out.println("It is not an enterprise custom outline code.");
14 }
15 System.out.println(
16 "Reference to another custom field for which this outline code definition is an alias is = "
17 + ocd.getEnterpriseOutlineCodeAlias());
18 System.out.println("Field Id = " + ocd.getFieldId());
19 System.out.println("Field Name = " + ocd.getFieldName());
20 System.out.println("Phonetic Alias = " + ocd.getPhoneticAlias());
21 System.out.println("Guid = " + ocd.getGuid());
22
23 // Display outline code masks
24 for (OutlineMask m1 : ocd.getMasks()) {
25 System.out.println("Level of a mask = " + m1.getLevel());
26 System.out.println("Mask = " + m1.toString());
27 }
28
29 // Display out line code values
30 for (OutlineValue v1 : ocd.getValues()) {
31 System.out.println("Description of outline value = " + v1.getDescription());
32 System.out.println("Value Id = " + v1.getValueId());
33 System.out.println("Value = " + v1.getValue());
34 System.out.println("Type = " + v1.getType());
35 }
36}