code: private CmsPermissionView buildPermissionEntryForm(
          CmsUUID id,
          CmsPermissionSet curSet,
          boolean editable,
          boolean extendedView) {
  
          String fileName = m_cms.getSitePath(m_resource);
          int flags = 0;
          try {
              I_CmsPrincipal p;
              try {
                  p = CmsPrincipal.readPrincipalIncludingHistory(m_cms, id);
              } catch (CmsException e) {
                  p = null;
              }
              if ((p != null) && p.isGroup()) {
                  flags = CmsAccessControlEntry.ACCESS_FLAGS_GROUP;
              } else if ((p != null) && p.isUser()) {
                  flags = CmsAccessControlEntry.ACCESS_FLAGS_USER;
              } else if ((p == null) && id.equals(CmsAccessControlEntry.PRINCIPAL_ALL_OTHERS_ID)) {
                  flags = CmsAccessControlEntry.ACCESS_FLAGS_ALLOTHERS;
              } else if ((p == null) && id.equals(CmsAccessControlEntry.PRINCIPAL_OVERWRITE_ALL_ID)) {
                  flags = CmsAccessControlEntry.ACCESS_FLAGS_OVERWRITE_ALL;
              } else {
                  // check if it is the case of a role
                  CmsRole role = CmsRole.valueOfId(id);
                  if (role != null) {
                      flags = CmsAccessControlEntry.ACCESS_FLAGS_ROLE;
                  }
              }
  
              CmsResource res = m_cms.readResource(fileName, CmsResourceFilter.ALL);
              CmsAccessControlEntry entry = new CmsAccessControlEntry(res.getResourceId(), id, curSet, flags);
              return buildPermissionEntryForm(entry, editable, extendedView, null);
          } catch (CmsException e) {
              // can usually be ignored
              if (LOG.isInfoEnabled()) {
                  LOG.info(e.getLocalizedMessage());
              }
              return null;
          }
      }
docs: @see #buildPermissionEntryForm(CmsAccessControlEntry, boolean, boolean, CmsUUID)
  
  @param id the UUID of the principal of the permission set
  @param curSet the current permission set
  @param editable boolean to determine if the form is editable
  @param extendedView boolean to determine if the view is selectable with DHTML
  @return String with HTML code of the form