Работа с кодами набросок в проекте

Пользовательские наброски кодов - это теги, которые вы определяете для задач или ресурсов, которые предоставляют структуру проекта, которая отличается от кодов WBS или номеров. Aspose.Tasks для Java позволяет вам получить эти схемы кодов и их свойства, такие как псевдоним, Alllevelsrequired, Enterprise, EnterpriseOutlineCodealias, FieldId, FieldName, Phoneticeticias, Guid, Masks и ценности.

Получение определений кода наброски Project Класс разоблачает getOutlineCodes (), который представляет собой набор OutlineCodedEfinition предметов. 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}
Subscribe to Aspose Product Updates

Get monthly newsletters & offers directly delivered to your mailbox.