code: public static I_CmsPrincipal readPrefixedPrincipal(CmsObject cms, String name) throws CmsException {
  
          if (CmsGroup.hasPrefix(name)) {
              // this principal is a group
              return cms.readGroup(CmsGroup.removePrefix(name));
          } else if (CmsUser.hasPrefix(name)) {
              // this principal is a user
              return cms.readUser(CmsUser.removePrefix(name));
          }
          // invalid principal name was given
          throw new CmsDbEntryNotFoundException(Messages.get().container(Messages.ERR_INVALID_PRINCIPAL_1, name));
      }
docs: Utility function to read a prefixed principal from the OpenCms database using the
  provided OpenCms user context.<p>
  
  The principal must be either prefixed with <code>{@link I_CmsPrincipal#PRINCIPAL_GROUP}.</code> or
  <code>{@link I_CmsPrincipal#PRINCIPAL_USER}.</code>.<p>
  
  @param cms the OpenCms user context to use when reading the principal
  @param name the prefixed principal name
  
  @return the principal read from the OpenCms database
  
  @throws CmsException in case the principal could not be read