Робота з контурними кодами в проекті
Спеціальні контурні коди - це теги, які ви визначаєте для завдань або ресурсів, які забезпечують структуру проекту, яка відрізняється від кодів WBS або окремих номерів. Aspose.Tasks для Java дозволяє вам отримати ці контурні коди та їх властивості, такі як псевдонім, AllLevelSrequired, Enterprise, EnterpriseOutLineCodealias, FieldId, FieldName, Phonetyias, Guid, Masks and Realse.
Отримання окреслених визначення коду Клас проект розкриває getoutlinecodes (), що є сукупністю ustlineCodeDefinition. OutlineCodedEfinition надає всі деталі, як показано в наступному зразковому коді.
Наступні рядки коду отримують інформацію про контур проекту.
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}