Examples of SmallContentType


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

      List<String> codes = new ArrayList<String>(this.getContentTypeElements().keySet());
      for (int i=0; i<codes.size(); i++) {
        String contentTypeCode = codes.get(i);
        List<String> categories = this.getContentTypeElements().get(contentTypeCode);
        if (categories.contains(categoryCode)) {
          SmallContentType contenType = (SmallContentType) this.getContentManager().getSmallContentTypesMap().get(contentTypeCode);
          contentTypes.add(contenType);
        }
      }
    } catch (Throwable t) {
      throw new ApsSystemException("Errore", t);
View Full Code Here

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

  public abstract AbstractContentRelactionDOM getConfigDom(String xml) throws ApsSystemException;
 
  @Override
  public void addRelation(String elementCode, String contentType) throws ApsSystemException {
    try {
      SmallContentType smallContentType =
        (SmallContentType) this.getContentManager().getSmallContentTypesMap().get(contentType);
      if (null == smallContentType) {
        throw new ApsSystemException("Content type missing : " + contentType);
      }
      if (null == this.getContentTypeElements().get(contentType)) {
View Full Code Here

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

    return this._contentVersion;
  }
 
  @Override
  public SmallContentType getSmallContentType(String typeCode) {
    SmallContentType contentType = this.getContentManager().getSmallContentTypesMap().get(typeCode);
    return contentType;
  }
View Full Code Here

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

        statistic.setId(id);
        ContentRecordVO content = this.getContentManager().loadContentVO(id);
        if (content == null) {
          statistic.setDescr(id);
        } else {
          SmallContentType contentType = contentTypes.get(content.getTypeCode());
          statistic.setDescr(content.getDescr());
          statistic.setType(contentType.getDescr());
        }
        statistic.setVisits(new Integer(res.getInt(2)));
        visitsStats.add(statistic);
      }
    } catch (Throwable t) {
View Full Code Here

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

  public void testEditSteps() throws Throwable {
    String typeCode = "ART";
    String result = this.executeEditSteps("admin", typeCode);
    assertEquals(Action.SUCCESS, result);
    WorkflowStepAction action = (WorkflowStepAction) this.getAction();
    SmallContentType contentType = action.getContentType();
    assertEquals(typeCode, contentType.getCode());
    assertEquals(typeCode, action.getTypeCode());
    assertEquals(3, action.getSteps().size());
  }
View Full Code Here

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

    WorkflowStepAction action = (WorkflowStepAction) this.executeSuccessfulEditSteps(typeCode);
   
    String result = this.executeMoveStep("admin", typeCode, IWorkflowStepAction.MOVEMENT_DOWN_CODE, "0", action.getSteps());
    assertEquals(Action.SUCCESS, result);
    action = (WorkflowStepAction) this.getAction();
    SmallContentType contentType = action.getContentType();
    assertEquals(typeCode, contentType.getCode());
    assertEquals(typeCode, action.getTypeCode());
    List<Step> steps = action.getSteps();
    assertEquals(3, steps.size());
    assertEquals("step2", steps.get(0).getCode());
    assertEquals("step1", steps.get(1).getCode());
View Full Code Here

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

    assertEquals(3, updateAction.getSteps().size());
   
    String result = this.executeRemoveStep("admin", typeCode, "step1", updateAction.getSteps());
    assertEquals(Action.SUCCESS, result);
    WorkflowStepAction action = (WorkflowStepAction) this.getAction();
    SmallContentType contentType = action.getContentType();
    assertEquals(typeCode, contentType.getCode());
    assertEquals(typeCode, action.getTypeCode());
    List<Step> steps = action.getSteps();
    assertEquals(2, steps.size());
    assertEquals("step2", steps.get(0).getCode());
    assertEquals("Step 2", steps.get(0).getDescr());
View Full Code Here

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

    Iterator it = this.getContentMapping().entrySet().iterator();
    Map<String, SmallContentType> contentTypes = this.getContentManager().getSmallContentTypesMap();
    while (it.hasNext()) {
      Map.Entry pairs = (Map.Entry)it.next();
      String typeCode = (String) pairs.getKey();
      SmallContentType smallContentType = (SmallContentType) contentTypes.get(typeCode);
      if (null != smallContentType) {
        availableContentTypes.put(typeCode, smallContentType.getDescr());
      }
    }
    return availableContentTypes;
  }
View Full Code Here

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

    try {
      IntroNewContentAction action = (IntroNewContentAction) joinPoint.getTarget();
      List<SmallContentType> allowedContentTypes = this.getAllowedContentTypes();
      boolean check = false;
      for (int i = 0; i < allowedContentTypes.size(); i++) {
        SmallContentType contentType = allowedContentTypes.get(i);
        if (contentType.getCode().equals(action.getContentTypeCode())) {
          check = true;
          break;
        }
      }
      if (!check) {
        SmallContentType contentType = (SmallContentType) this.getContentManager().getSmallContentTypesMap().get(action.getContentTypeCode());
        String typeDescr = contentType != null ? contentType.getCode() : action.getContentTypeCode();
        action.addFieldError("contentTypeCode", action.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

  private String createBody(UserDetails user, List<ContentMailInfo> contentsToNotifyToUser, Map<String, SmallContentType> smallContentTypes) {
    String defaultLangCode = this.getLangManager().getDefaultLang().getCode();
    NotifierConfig config = this.getConfig();
    StringBuffer body = new StringBuffer(config.getHeader());
    for (ContentMailInfo info : contentsToNotifyToUser) {
      SmallContentType smallContentType = (SmallContentType) smallContentTypes.get(info.getContentTypeCode());
      String link = this.createLink(info, defaultLangCode);

      Map<String, String> params = this.prepareContentParams(info, smallContentType, link);
      switch (info.getOperationCode()) {
      case PublicContentChangedEvent.INSERT_OPERATION_CODE:
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.