Examples of SmallContentType


Examples of com.agiletec.plugins.jacms.aps.system.services.content.model.SmallContentType

    List<SmallContentType> list = new ArrayList<SmallContentType>();
    try {
      List<SmallContentType> smallContentTypes = super.getContentTypes();
      if (null != smallContentTypes && !smallContentTypes.isEmpty()) {
        for (int i = 0; i < smallContentTypes.size(); i++) {
          SmallContentType smallContentType = smallContentTypes.get(i);
          Content prototype = (Content) this.getContentManager().getEntityPrototype(smallContentType.getCode());
          if (null != prototype.getAttributeByRole(GeoRefSystemConstants.ATTRIBUTE_ROLE_COORD)) {
            list.add(smallContentType);
          }
        }
      }
View Full Code Here

Examples of com.agiletec.plugins.jacms.aps.system.services.content.model.SmallContentType

  protected void checkContentType() {
    try {
      List<SmallContentType> allowedContentTypes = this.getContentTypes();
      boolean check = false;
      for (int i = 0; i < allowedContentTypes.size(); i++) {
        SmallContentType contentType = allowedContentTypes.get(i);
        if (contentType.getCode().equals(this.getContentTypeCode())) {
          check = true;
          break;
        }
      }
      if (!check) {
        SmallContentType contentType = (SmallContentType) this.getContentManager().getSmallContentTypesMap().get(this.getContentTypeCode());
        String typeDescr = contentType != null ? contentType.getCode() : this.getContentTypeCode();
        this.addFieldError("contentTypeCode", this.getText("error.content.contentType.userNotAllowed", typeDescr));
      }
    } catch (Throwable t) {
      ApsSystemUtils.logThrowable(t, this, "getAllowedContentTypes", "Error checking content type authorization");
          throw new RuntimeException("Error extracting allowed content types", t);
View Full Code Here

Examples of com.agiletec.plugins.jacms.aps.system.services.content.model.SmallContentType

        return false;
      }
      boolean allowedType = false;
      List<SmallContentType> allowedContentTypes = this.getAllowedContentTypes(currentUser);
      for (int i = 0; i < allowedContentTypes.size(); i++) {
        SmallContentType smallContentType = allowedContentTypes.get(i);
        if (smallContentType.getCode().equals(content.getTypeCode())) {
          allowedType = true;
          break;
        }
      }
      if (!allowedType) {
View Full Code Here

Examples of com.agiletec.plugins.jacms.aps.system.services.content.model.SmallContentType

    List<WorkflowSearchFilter> filters = new ArrayList<WorkflowSearchFilter>();
    try {
      List<SmallContentType> contentTypes = this.getManagingContentTypes(user);
      boolean isSupervisor = this.getAuthorizationManager().isAuthOnPermission(user, Permission.SUPERVISOR);
      for (int i = 0; i < contentTypes.size(); i++) {
        SmallContentType type = contentTypes.get(i);
        Workflow workflow = this.getWorkflow(type.getCode());
        WorkflowSearchFilter filter = new WorkflowSearchFilter();
        filter.setTypeCode(type.getCode());
        List<String> allowedSteps = this.getAllowedStatus(user, isSupervisor, workflow);
        filter.setAllowedSteps(allowedSteps);
        filters.add(filter);
      }
    } catch (Throwable t) {
View Full Code Here

Examples of com.agiletec.plugins.jacms.aps.system.services.content.model.SmallContentType

  public List<SmallContentType> getManagingContentTypes(UserDetails user) throws ApsSystemException {
    List<SmallContentType> types = new ArrayList<SmallContentType>();
    try {
      List<SmallContentType> contentTypes = this.getContentManager().getSmallContentTypes();
      for (int i = 0; i < contentTypes.size(); i++) {
        SmallContentType contentType = contentTypes.get(i);
        Workflow workflow = this.getWorkflow(contentType.getCode());
        if (null != workflow && null != workflow.getRole()) {
          String roleName = workflow.getRole();
          if (null == roleName || roleName.trim().length() == 0
              || this.getAuthorizationManager().isAuthOnRole(user, roleName)) {
            types.add(contentType);
View Full Code Here

Examples of com.agiletec.plugins.jacms.aps.system.services.content.model.SmallContentType

    Set<String> mappings = this.getRssConverterManager().getMappings();
    tempContentTypes.addAll(mappings);
    List<SmallContentType> contentTypes = new ArrayList<SmallContentType>();
    for (int i = 0; i < tempContentTypes.size(); i++) {
      String code = tempContentTypes.get(i);
      SmallContentType smallContentType = this.getSmallContentType(code);
      contentTypes.add(smallContentType);
    }
   
    return contentTypes;
  }
View Full Code Here

Examples of com.agiletec.plugins.jacms.aps.system.services.content.model.SmallContentType

      }
    }
  }

  public SmallContentType getSmallContentType(String code) {
    SmallContentType smallContentType = null;
    Map<String, SmallContentType> smallContentTypes = this.getContentManager().getSmallContentTypesMap();
    if (smallContentTypes.containsKey(code)) {
      smallContentType = (SmallContentType) smallContentTypes.get(code);
    }
    return smallContentType;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.