Mastering Data Modeling with Liferay Objects

Course Overview

Extending System Objects

Liferay exposes some of its core entities as system objects within the Objects framework. This way, you can extend them and integrate them with your custom data models, further tailoring Liferay's core functionality to meet your specific business needs. By integrating system objects with custom objects, you can create more robust and comprehensive solutions, leveraging existing data.

However, remember that system objects have certain limitations compared to custom objects. You cannot delete system objects or change their existing fields. Additionally, system objects restrict some configuration options. They also use their own headless APIs.

Any changes you make to system objects are instantly reflected in their headless APIs (e.g., fields, relationships, actions).

In general, system objects support these features:

Object Feature System Objects Custom Objects
Actions
Fields
Layouts  
Relationships
State Manager  
Validations
Views  

 

Though supported, some features function differently for system objects than they do for custom objects.

  • Fields: System objects support all field types except for state fields. Additionally, these fields are accessible only via headless APIs, since you cannot update the system object’s UI to include new fields.

  • Validations: System objects support all kinds of validations, though you can only define validations for the object’s default fields, not for any new fields you add. When triggered, these validations check for valid field entries and show custom error messages for invalid entries.

While you can extend system objects in several ways, defining relationships is often the most valuable feature. Relationships enable you to connect your custom data models with Liferay's core entities, so you can leverage their data.

In fact, Clarity wants to relate their apps with system objects. For example, they want to relate their Ticket object with the User system objects, since it would enable them to assign tickets to specific support team members already existing in Liferay. You'll explore relationships in greater detail in Module 3.

Besides relationships, Clarity plans to extend the User object by adding a dedicated field for their distributor management app. This field will store a unique distributor ID, connecting the users with their distributor account.

Conclusion

Understanding how you can leverage system objects is important to designing effective solutions that use system data and features, reducing work and improving integration. Next, you’ll set up data models for Clarity’s distributor management app.

  • Conclusion

Loading Knowledge

Capabilities

Product

Education

Contact Us

Connect

Powered by Liferay
© 2024 Liferay Inc. All Rights Reserved • Privacy Policy