JSMA portals

Overview

The JSMA portals provides functionality for finding portals.

What can JSMA portals do for me?

You could easily use the JSMA portals to find portals

Index

Methods

The JSMA portals provides the following methods:

portal portals.current

Returns the current portal (JSMA portal) of the request session.

Example

...
var curPortal = portals.current;
...

portal portals.findById(id)

Finds a portal by a given id.

Example

...
var searchedPortal = portals.findById(123);
...

Avoid usage of findById

Ids change whenever a package is reimported. So please avoid using ids whenever possible. Also delivering contents to users by id might make it possible for users to flip through the references (and by that see contents of others possibly) by changing the ids in requests

Parameter int id

The id of the portal

portal portals.findByName(name)

Finds a portal by a given name.

Example

...
var searchedPortal = portals.findByName(name);
...

Parameter string name

portal portals.findByUuid(uuid)

Finds a portal by a given uuid.

Example

...
var searchedPortal = portals.findByUuid('D1B71463-67F8-4BD0-8ED4-A03F8FC63497');
...

Parameter string uuid