Skip to content

Commit

Permalink
refactor: ♻️ refactor customizing documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
miggi92 committed Apr 24, 2024
1 parent c9d6d7f commit e32410d
Show file tree
Hide file tree
Showing 6 changed files with 50 additions and 34 deletions.
7 changes: 6 additions & 1 deletion docs/.vitepress/config.mts
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,12 @@ function sidebarDocumentation() {
{ text: 'DPC boilerplate code', link: '/documentation/DPC-boilerplate-code' },
{
text: 'OData customizing', link: '/documentation/customizing/', collapsed: true,
items: []
items: [
{ text: 'Create namespace', link: '/documentation/customizing/create-namespace' },
{ text: 'Define entity', link: '/documentation/customizing/define-entity' },
{ text: 'Define properties', link: '/documentation/customizing/define-properties' },
{ text: 'Define navigation properties', link: '/documentation/customizing/define-associations' }
]
}
],
},
Expand Down
12 changes: 12 additions & 0 deletions docs/documentation/customizing/create-namespace.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
title: Create namespace
---
# {{ $frontmatter.title }}

To create a namespace, just enter the namespace you want to use and define weather it is a [global namespace](#global-namespace) or not. The name should match the name that you used in the [DPC](../definitions/DPC) and [MPC](../definitions/MPC) framework methods mention in the [Creating a service](../Creating-a-service) file ([Implement the framework MPC method](../Creating-a-service#implement-the-framework-mpc-method) / [Implementing the framework DPC methods](../Creating-a-service#implementing-the-framework-dpc-methods) )

![Create namespace](./attachments/cust_create_namespace.png)

## Global Namespace

A global namespace is appended to **every** OData Service that is using this framework. It might be useful for some global entities such as a "document" entity.
13 changes: 13 additions & 0 deletions docs/documentation/customizing/define-associations.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
title: Define navigation properties
---

# {{ $frontmatter.title }}

A navigation property also known as association can easily be created via customizing. The navigation properties are defined under an entity.

![navigation property tree](./attachments/cust_nav_prop_tree.png)

Just enter the navigation property name, the entity you want to navigate from and the entity you want to navigate to and at least the relation of that navigation.

![navigation property customizing](./attachments/nav_prop_cust.png)
11 changes: 11 additions & 0 deletions docs/documentation/customizing/define-entity.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
title: Define entity
---

# {{ $frontmatter.title }}

To define entities you need to select the namespace you want to define an entity for.

![define entity](./attachments/cust_define_entity.png)

The classes added to the customizing should inherit from "[ZCL_ODATA_MAIN](./dev-objects/classes/ZCL_ODATA_MAIN)" class.
8 changes: 8 additions & 0 deletions docs/documentation/customizing/define-properties.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
title: Define properties
---

# {{ $frontmatter.title }}

>[!warning]
>Still not documented
33 changes: 0 additions & 33 deletions docs/documentation/customizing/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,36 +11,3 @@ Transactioncode: **ZODATA_CUST**
> [!info]
> This transaction is calling the "SM34" transaction code with the view cluster name.
> So make sure, that you have the permissions to change entries in the view cluster "ZODATA_VC".
## Create Namespace

To create a namespace, just enter the namespace you want to use and define weather it is a [global namespace](#global-namespace) or not. The name should match the name that you used in the [DPC](../definitions/DPC) and [MPC](../definitions/MPC) framework methods mention in the [Creating a service](../Creating-a-service) file ([Implement the framework MPC method](../Creating-a-service#implement-the-framework-mpc-method) / [Implementing the framework DPC methods](../Creating-a-service#implementing-the-framework-dpc-methods) )

![Create namespace](./attachments/cust_create_namespace.png)

### Global Namespace

A global namespace is appended to **every** OData Service that is using this framework. It might be useful for some global entities such as a "document" entity.

## Define Entities

To define entities you need to select the namespace you want to define an entity for.

![define entity](./attachments/cust_define_entity.png)

The classes added to the customizing should inherit from "[ZCL_ODATA_MAIN](./dev-objects/classes/ZCL_ODATA_MAIN)" class.

## Define Properties

>[!warning]
>Still not documented
## Navigation Properties / Associations

A navigation property also known as association can easily be created via customizing. The navigation properties are defined under an entity.

![navigation property tree](./attachments/cust_nav_prop_tree.png)

Just enter the navigation property name, the entity you want to navigate from and the entity you want to navigate to and at least the relation of that navigation.

![navigation property customizing](./attachments/nav_prop_cust.png)

0 comments on commit e32410d

Please sign in to comment.