or run

npx @tessl/cli init
Log in

Version

Tile

Overview

Evals

Files

Files

docs

data-providers.mdexpressions.mdform-management.mdindex.mdintegration-extensions.mdmodels-services.mdsecurity-validation.mdstorage-io.mdtemplates.md

integration-extensions.mddocs/

0

# Integration & Extensions

1

2

Info framework integration, WebDAV support, utilities, comparators, and extensibility APIs.

3

4

## Capabilities

5

6

### Info Framework Integration

7

8

```java { .api }

9

interface DDMFormValuesInfoFieldValuesProvider<T> {

10

InfoFieldValue<Object> getInfoFieldValue(T model, String fieldName, Locale locale);

11

List<InfoFieldValue<Object>> getInfoFieldValues(T model, Locale locale);

12

}

13

14

interface DDMStructureInfoItemFieldSetProvider {

15

InfoFieldSet getInfoFieldSet(String itemClassName, long itemClassPK, long structureId);

16

}

17

18

interface DDMFormFieldInfoFieldConverter {

19

InfoField convert(DDMFormField ddmFormField, Locale locale);

20

}

21

```

22

23

### WebDAV Support

24

25

```java { .api }

26

interface DDMWebDAVStorage extends WebDAVStorage {

27

Resource getResource(WebDAVRequest webDAVRequest) throws WebDAVException;

28

boolean isSupportsClassTwo();

29

}

30

```

31

32

### Utility Classes

33

34

```java { .api }

35

class DDMFormFactory {

36

static DDMForm create(Class<?> clazz);

37

static DDMForm create(Class<?> clazz, Locale locale);

38

}

39

40

class DDMFormInstanceFactory {

41

DDMFormInstance create(DDMStructure structure, DDMFormInstanceSettings settings);

42

}

43

44

class DDMBeanTranslator {

45

Object translate(Object bean, Class<?> targetClass);

46

}

47

```

48

49

### Comparators

50

51

```java { .api }

52

class DDMStructureNameComparator extends OrderByComparator<DDMStructure> {

53

DDMStructureNameComparator(boolean ascending);

54

int compare(DDMStructure structure1, DDMStructure structure2);

55

}

56

57

class DDMTemplateNameComparator extends OrderByComparator<DDMTemplate> {

58

DDMTemplateNameComparator(boolean ascending);

59

int compare(DDMTemplate template1, DDMTemplate template2);

60

}

61

62

class DDMFormInstanceNameComparator extends OrderByComparator<DDMFormInstance> {

63

DDMFormInstanceNameComparator(boolean ascending);

64

int compare(DDMFormInstance formInstance1, DDMFormInstance formInstance2);

65

}

66

```

67

68

## Usage Examples

69

70

### Using Utilities and Comparators

71

72

```java

73

@Component

74

public class UtilityExample {

75

76

@Reference

77

private DDMStructureLocalService structureLocalService;

78

79

public List<DDMStructure> getSortedStructures(long groupId) {

80

List<DDMStructure> structures = structureLocalService.getStructures(groupId);

81

82

// Sort structures by name

83

structures.sort(new DDMStructureNameComparator(true));

84

85

return structures;

86

}

87

88

public DDMForm createFormFromAnnotation(Class<?> annotatedClass) {

89

// Create DDM form from annotation

90

return DDMFormFactory.create(annotatedClass, Locale.US);

91

}

92

}

93

```