Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. name: The name of the ZIP file (without the extension).

  2. portal: The unique identifier (UUID) of the portals/section from which assets are downloaded.

  3. uuids: The UUIDs of the selected media files for download.

  4. data: Additional metadata about the request such as download options, file transformation profiles, etc.

  5. expires: The expiration date for the download link.
    Once it reaches its expiration date, the instance will be automatically deleted. The expiration date is obtained by adding to the date of the request creation, the value of the parameter portal_download_expiration of the plugin PACKAGED_Portals (the Default value is 7 days).

  6. query: If provided, this specifies a query to dynamically select assets for dynamic download. If filled, the value set in the uuids property is ignored.

Expand
titlesource of portal download

Find below the input to generate this image with plantUml

Code Block
@startuml
hide empty members
object portaldownload
portaldownload : name = data
portaldownload : portal = data
portaldownload : uuids = text
portaldownload : data = text
portaldownload : expires = datetime
portaldownload : query = text
@enduml

...

Below is a list of services used within the plugin PACKAGED_Portals for the portals feature.

Triggers

Portal

The service com.wedia.packaged.portals.extensions.PortalsTrigger contains the logic for managing triggers related to the "portal" object. It ensures that the appropriate actions are performed whenever certain events (here insertion or update) occur on the portal object.

  • Visibility

The visibility property of the portal object controls the visibility state of an instance. Three values are possible for that property: public, private, and internal. If an unknown value is set inside that property, it will be replaced by a value that will be inferred from the current instance properties.

The properties controlled by the visibility property are status and private.

Visibility

Status

Private

public

Online state (by default Online : 6)

Value is not considered as the online status prevails on the private value

private

Default state (by default Draft : 2)

True

internal

Default state (by default Draft :

...

Assets

APIs

...

2)

False

  • Synchronization between page and sections

With the help of the service trigger on the portal object, some properties are automatically propagated from the parent portal to its sections.

Those properties are team, viewers, private, status and activated.

On the other hand, if a section has one of these properties set to a value different from its parent portal, it will be rolled back to the portal’s value for that property.

  • Send notification to viewers/team

The trigger on portal is also used to send notifications when one of the properties team or viewers is updated with a new user.

Assets

The plugin PACKAGED_Portals provides a trigger on assets related to portals (objects that have the tag damobject and a field portals that points to the portal object). That trigger is executed whenever an asset is inserted or updated.

It handles essentially the correct assignment/removal to/from portal’s sections when inserting or updating assets, through the portals property, ensuring that the management of the property portal.newestitems is correctly updated with the uuids of the newly added/removed asset.

The trigger also makes sure that instances assigned to portals property are updatable by surfer. If it’s not the case, an error will be thrown during save.

Note

Only sections are kept inside that property. Instances that are not sections are filtered and removed.

...

1. Portal Object Trigger Service

...