Exemple #1
0
 /** Return TRUE if privacy set to visible, FALSE if set to hidden */
 public boolean isShow() {
   if (isMyWorkspace()) {
     return privacyManager.isViewable(curSite, getUserId());
   } else {
     return privacyManager.isViewable(getContextId(), getUserId());
   }
 }
Exemple #2
0
  public Boolean getDisplayPopup() {
    if (!isMyWorkspace()) {
      curSite = getContextId();
    }
    // Display popup for when user has not made a selection AND system default is hidden
    if (displayPopup == null) {
      Boolean userMadeSelection = false;
      Boolean currentStatus = false;

      userMadeSelection = privacyManager.userMadeSelection(curSite, getUserId());
      currentStatus = privacyManager.isViewable(curSite, getUserId());

      displayPopup = (userMadeSelection || currentStatus ? false : true);
    }
    return displayPopup;
  }
Exemple #3
0
  /** Returns 'visible' or 'hidden' based on status within site */
  public String getCurrentStatus() {
    if (!isMyWorkspace()) {
      curSite = getContextId();
    }

    if (privacyManager.isViewable(curSite, getUserId())) {
      return VISIBLE; // getMessageBundleString(VISIBLE);
    } else {
      return HIDDEN; // getMessageBundleString(HIDDEN);
    }
  }
Exemple #4
0
  /** Returns text currently displayed on checkbox */
  public String getCheckboxText() {
    if (!isMyWorkspace()) {
      curSite = getContextId();
    }

    if (privacyManager.isViewable(curSite, getUserId())) {
      checkboxText = getMessageBundleString(HIDE);
    } else {
      checkboxText = getMessageBundleString(SHOW);
    }

    return checkboxText;
  }
Exemple #5
0
 /** Does the actual setting of the privacy status */
 private void processChoice(String contextId, Boolean status) {
   privacyManager.setViewableState(
       contextId, getUserId(), status, privacyManager.USER_RECORD_TYPE);
 }