Package edu.uga.galileo.voci.model

Examples of edu.uga.galileo.voci.model.ContentType


    if ((request.getParameterValues("blurbMe") != null)
        && (request.getSession().getAttribute("user") != null)) {
      String[] newFieldsToBlurbFrom = request
          .getParameterValues("blurbMe");

      ContentType contentType = ContentType.valueOf(Integer
          .parseInt(request.getParameter("ctype")));
      try {
        int projectId = (new ProjectManager()).getProjectID(command
            .getProject());
        for (int m = 0; m < newFieldsToBlurbFrom.length; m++) {
          // strip out the starting "s:" from the advanced search
          // pages
          newFieldsToBlurbFrom[m] = newFieldsToBlurbFrom[m]
              .substring(2);
          // then fill in the rest of the info that the page expects
          newFieldsToBlurbFrom[m] = newFieldsToBlurbFrom[m]
              + " ("
              + (new MetadataManager())
                  .getDisplayNameByElementAndQualifier(
                      projectId, contentType.getValue(),
                      newFieldsToBlurbFrom[m]) + ")";
        }
      } catch (NoSuchProjectException e) {
        Logger.warn("Couldn't get project ID for handle '"
            + command.getProject() + "'");
      }

      (new UserManager()).setUserPreference((User) request.getSession()
          .getAttribute("user"), command.getProject() + "-"
          + contentType.toString().toLowerCase() + "BlurbFields",
          StringUtils.join(newFieldsToBlurbFrom, "|"));
    }
  }
View Full Code Here


    // get the root content element
    try {
      int elementId = Integer.parseInt(command.getOther().get(
          command.getOther().size() - 1));
      ContentType contentType = DAOFactory.getHelperDAO()
          .getContentTypeById(elementId);

      if (contentType == ContentType.COMMUNITY) {
        request.setAttribute("vbo", (new CommunityManager())
            .getCommunity(command, elementId, command
View Full Code Here

      return "ERROR: Bad request format (2).";
    }

    try {
      String projectHandle = options[0];
      ContentType contentType = ContentType.valueOf(options[1]
          .toUpperCase());
      int metadataId = Integer.parseInt(options[2]);

      Command command = new Command(projectHandle, "metadata",
          contentType.toString().toLowerCase(), null);

      HttpSession session = SessionTracker.getSessionById(options[3]);
      if (session == null) {
        return "ERROR: Requested session doesn't exist.";
      }
View Full Code Here

          errors.add("You don't have permission to add a "
              + "subcommunity to the requested community.");
          goToList = true;
        } else {
          try {
            ContentType parentType = DAOFactory.getHelperDAO()
                .getContentTypeById(parentId);
            if (parentType == ContentType.COMMUNITY) {
              if (!openNodes.contains(parentId)) {
                openNodes.add(parentId);
                request.getSession().setAttribute(
View Full Code Here

          errors.add("You don't have permission to add a "
              + "bundle to the requested object.");
          goToList = true;
        } else {
          try {
            ContentType parentType = DAOFactory.getHelperDAO()
                .getContentTypeById(parentId);
            if ((parentType == ContentType.COMMUNITY)
                || (parentType == ContentType.COLLECTION)) {
              if (!openNodes.contains(parentId)) {
                openNodes.add(parentId);
View Full Code Here

          errors.add("You don't have permission to add a "
              + "collection to the requested object.");
          goToList = true;
        } else {
          try {
            ContentType parentType = DAOFactory.getHelperDAO()
                .getContentTypeById(parentId);
            if ((parentType == ContentType.COMMUNITY)
                || (parentType == ContentType.COLLECTION)) {
              if (!openNodes.contains(parentId)) {
                openNodes.add(parentId);
View Full Code Here

            errors.add("You don't have permission to add a "
                + "item to the requested object.");
            goToList = true;
          } else {
            try {
              ContentType parentType = DAOFactory.getHelperDAO()
                  .getContentTypeById(parentId);
              if (parentType != ContentType.ITEM) {
                if (!openNodes.contains(parentId)) {
                  openNodes.add(parentId);
                  request.getSession().setAttribute(
View Full Code Here

TOP

Related Classes of edu.uga.galileo.voci.model.ContentType

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.