Class PropertyRestrictionBean

  • Direct Known Subclasses:
    PropertyRestrictionBeanImpl

    public abstract class PropertyRestrictionBean
    extends Object
    Assists the role-based policies in determining whether a property or resource may be displayed, modified, or published in linked open data. There is a singleton bean that holds the current threshold role levels for displaying, modifying, or publishing restricted properties. Create this bean after the context models are in place. Add PropertyRestrictionListener to your EditProcessObject if you are editing a property, to ensure that the bean stays current.
    • Constructor Detail

      • PropertyRestrictionBean

        public PropertyRestrictionBean()
    • Method Detail

      • canDisplayResource

        public abstract boolean canDisplayResource​(String resourceUri,
                                                   BaseResourceBean.RoleLevel userRole)
        Any resource can be displayed. (Someday we may want to implement display restrictions based on VClass.)
      • canModifyResource

        public abstract boolean canModifyResource​(String resourceUri,
                                                  BaseResourceBean.RoleLevel userRole)
        A resource cannot be modified if its namespace is in the prohibited list (but some exceptions are allowed). (Someday we may want to implement modify restrictions based on VClass.)
      • canPublishResource

        public abstract boolean canPublishResource​(String resourceUri,
                                                   BaseResourceBean.RoleLevel userRole)
        Any resource can be published. (Someday we may want to implement publish restrictions based on VClass.)
      • canDisplayPredicate

        public abstract boolean canDisplayPredicate​(Property predicate,
                                                    BaseResourceBean.RoleLevel userRole)
        If display of a predicate is restricted, the user's role must be at least as high as the restriction level.
      • canModifyPredicate

        public abstract boolean canModifyPredicate​(Property predicate,
                                                   BaseResourceBean.RoleLevel userRole)
        A predicate cannot be modified if its namespace is in the prohibited list (some exceptions are allowed). If modification of a predicate is restricted, the user's role must be at least as high as the restriction level.
      • canPublishPredicate

        public abstract boolean canPublishPredicate​(Property predicate,
                                                    BaseResourceBean.RoleLevel userRole)
        If publishing of a predicate is restricted, the user's role must be at least as high as the restriction level.
      • updateProperty

        public abstract void updateProperty​(PropertyRestrictionLevels levels)
        The threshold values for this property may have changed.