Class UserAssetLink

java.lang.Object
org.openremote.model.asset.UserAssetLink

@Entity public class UserAssetLink extends Object
An asset can be linked to many users, and a user can have links to many assets.

If a user has linked assets, it's a restricted user. When a client authenticates with such a user, the client can only access the assigned/linked assets of that user, and the available operations are limited:

  • When a restricted client reads assets, only dynamic attributes with MetaItemType.ACCESS_RESTRICTED_READ are included. A restricted client may submit a query for public assets and dynamic attributes with MetaItemType.ACCESS_PUBLIC_READ.
  • When a restricted client updates existing assets, new attributes can be added, but only attributes with MetaItemType.ACCESS_RESTRICTED_WRITE can be updated or deleted; note Access meta items cannot be modified. Any new attributes are automatically set with MetaItemType.ACCESS_RESTRICTED_READ and MetaItemType.ACCESS_RESTRICTED_WRITE, thus ensuring that a restricted client can fully access its own attributes.
  • A restricted client can not create or delete assets. A restricted client can not change the name, parent, or realm of an asset. A restricted user can not make an asset public. A restricted user can change the location of an asset.
.
  • Field Details

    • id

      protected UserAssetLink.Id id
    • createdOn

      protected Date createdOn
    • assetName

      protected String assetName
    • parentAssetName

      protected String parentAssetName
    • userFullName

      protected String userFullName
  • Constructor Details

    • UserAssetLink

      protected UserAssetLink()
    • UserAssetLink

      public UserAssetLink(UserAssetLink.Id id)
    • UserAssetLink

      public UserAssetLink(String realm, String userId, String assetId)
  • Method Details

    • getId

      public UserAssetLink.Id getId()
    • getAssetName

      public String getAssetName()
    • getParentAssetName

      public String getParentAssetName()
    • getUserFullName

      public String getUserFullName()
    • getCreatedOn

      public Date getCreatedOn()
    • setCreatedOn

      public void setCreatedOn(Date createdOn)
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object