Package org.infoglue.cms.applications.common

Examples of org.infoglue.cms.applications.common.ImageButton


    return new ImageButton("ViewListContentVersion.action?contentId=" + this.contentId, getLocalizedString(getSession().getLocale(), "images.contenttool.buttons.publishContent"), "tool.contenttool.publishContent.header")
  }

  private ImageButton getExecuteTaskButton()
  {
    return new ImageButton(true, "javascript:openPopup('ViewExecuteTask.action?contentId=" + this.contentId + "', 'ExecuteTask', 'width=400,height=600,resizable=yes,scrollbars=yes');", getLocalizedString(getSession().getLocale(), "images.global.buttons.executeTask"), "tool.common.executeTask.header")
  }
View Full Code Here


 
  private ImageButton getAccessRightsButton() throws Exception
  {
    String returnAddress = URLEncoder.encode(URLEncoder.encode("ViewContent.action?contentId=" + this.contentId + "&repositoryId=" + this.repositoryId + "&stay=true", "UTF-8"), "UTF-8");
    //return new ImageButton("ViewAccessRights.action?name=Content&value=" + this.contentId + "&returnAddress=" + returnAddress, getLocalizedString(getSession().getLocale(), "images.contenttool.buttons.contentAccessRights"), "Content Access Rights");
    return new ImageButton("ViewAccessRights.action?interceptionPointCategory=Content&extraParameters=" + this.contentId +"&colorScheme=ContentTool&returnAddress=" + returnAddress, getLocalizedString(getSession().getLocale(), "images.contenttool.buttons.contentAccessRights"), "tool.contenttool.contentAccessRights.header");
  }
View Full Code Here

  }

  private ImageButton getContentVersionAccessRightsButton() throws Exception
  {
    String returnAddress = URLEncoder.encode(URLEncoder.encode("ViewContentVersion.action?contentVersionId=" + this.contentVersionId + "&contentId=" + contentId + "&languageId=" + languageId, "UTF-8"), "UTF-8");
    return new ImageButton("ViewAccessRights.action?interceptionPointCategory=ContentVersion&extraParameters=" + this.contentVersionId +"&colorScheme=ContentTool&returnAddress=" + returnAddress, getLocalizedString(getSession().getLocale(), "images.contenttool.buttons.contentAccessRights"), "tool.contenttool.contentVersionAccessRights.header");
  }
View Full Code Here

  }

  private ImageButton getComponentAccessRightsButton() throws Exception
  {
    String returnAddress = URLEncoder.encode(URLEncoder.encode("ViewContent.action?contentId=" + this.contentId + "&repositoryId=" + this.repositoryId + "&stay=true", "UTF-8"), "UTF-8");
    return new ImageButton("ViewAccessRights.action?interceptionPointCategory=Component&extraParameters=" + this.contentId +"&colorScheme=ContentTool&returnAddress=" + returnAddress, getLocalizedString(getSession().getLocale(), "images.contenttool.buttons.componentAccessRights"), "tool.contenttool.componentAccessRights.header");
  }
View Full Code Here

    return new ImageButton("ViewAccessRights.action?interceptionPointCategory=Component&extraParameters=" + this.contentId +"&colorScheme=ContentTool&returnAddress=" + returnAddress, getLocalizedString(getSession().getLocale(), "images.contenttool.buttons.componentAccessRights"), "tool.contenttool.componentAccessRights.header");
  }

  private ImageButton getDeployComponentButton()
  {
    return new ImageButton(true, "javascript:if(top.openInlineDiv) top.openInlineDiv('ViewDeploymentChooseServer!inputQuickV3.action?contentId=" + this.contentId + "', 600, 800, true, true, 'Deploy local component'); else openPopup('ViewDeploymentChooseServer!inputQuickV3.action?contentId=" + this.contentId + "', 'Deploy', 'width=800,height=600,resizable=yes,scrollbars=yes');", getLocalizedString(getSession().getLocale(), "images.global.buttons.deployComponent"), "tool.common.deployComponent.header")
    //return new ImageButton(true, "javascript:openPopup('ViewDeploymentChooseServer!inputQuickV3.action?contentId=" + this.contentId + "', 'Deploy', 'width=800,height=600,resizable=yes,scrollbars=yes');", getLocalizedString(getSession().getLocale(), "images.global.buttons.deployComponent"), "tool.common.deployComponent.header"); 
  }
View Full Code Here

  {
    List buttons = new ArrayList();
   
    try
    {
      buttons.add(new ImageButton("CreateContent!input.action?isBranch=false&parentContentId=" + this.contentId + "&repositoryId=" + this.repositoryId, getLocalizedString(getSession().getLocale(), "images.contenttool.buttons.newContent"), "tool.contenttool.newContent.header"))
      buttons.add(new ImageButton("CreateContent!input.action?isBranch=true&parentContentId=" + this.contentId + "&repositoryId=" + this.repositoryId, getLocalizedString(getSession().getLocale(), "images.contenttool.buttons.newContentFolder"), "tool.contenttool.newContentFolder.header"))
     
      ImageButton moveButton = getMoveButton();
      moveButton.getSubButtons().add(getMoveMultipleButton());
      buttons.add(moveButton);
     
      ImageButton deleteButton = getDeleteButton();
      ImageButton deleteChildrenButton = getDeleteChildrenButton();
      deleteButton.getSubButtons().add(deleteChildrenButton);
     
      buttons.add(deleteButton);
     
      buttons.add(getPublishButton());
      //if(hasAnyPublishedVersion())
      //{
        ImageButton unpublishButton = getUnpublishButton();
        ImageButton unpublishAllButton = getUnpublishAllButton();
        unpublishButton.getSubButtons().add(unpublishAllButton);
       
        buttons.add(unpublishButton);
      //}
   
      buttons.add(new ImageButton("ViewContentProperties.action?contentId=" + this.contentId, getLocalizedString(getSession().getLocale(), "images.global.buttons.editProperties"), "Edit Properties", new Integer(22), new Integer(80)));

      if(this.contentVO.getIsProtected().intValue() == ContentVO.YES.intValue())
      {
          ImageButton accessRightsButton = getAccessRightsButton();
        buttons.add(accessRightsButton);
      }

      if(this.contentVO.getContentTypeDefinitionId() != null)
      {
        ContentTypeDefinitionVO contentTypeDefinitionVO = ContentTypeDefinitionController.getController().getContentTypeDefinitionVOWithId(this.contentVO.getContentTypeDefinitionId());
        if(contentTypeDefinitionVO != null && (contentTypeDefinitionVO.getName().equalsIgnoreCase("HTMLTemplate") || contentTypeDefinitionVO.getName().equalsIgnoreCase("PageTemplate") || contentTypeDefinitionVO.getName().equalsIgnoreCase("PagePartTemplate")))
        {
          buttons.add(getComponentAccessRightsButton());
          buttons.add(getDeployComponentButton());
        }
      }
     
      buttons.add(new ImageButton("ViewContentVersionHistory.action?contentId=" + this.contentId, getLocalizedString(getSession().getLocale(), "images.contenttool.buttons.viewHistory"), "History", new Integer(22), new Integer(80)));

      buttons.add(getSyncTreeButton());

      buttons.add(getExecuteTaskButton());

      //if(this.getInfoGluePrincipal().getIsAdministrator())
        buttons.add(new ImageButton("UpdateContent!inputContentType.action?contentId=" + this.contentId + "&repositoryId=" + this.repositoryId, getLocalizedString(getSession().getLocale(), "images.contenttool.buttons.changeContentType"), "tool.contenttool.changeContentType.header"))

      if(AccessRightController.getController().getIsPrincipalAuthorized(this.getInfoGluePrincipal(), "ContentTool.ImportExport", true))
      {
        ImageButton exportButton = new ImageButton("ExportContent!input.action?contentId=" + this.contentId + "&repositoryId=" + this.repositoryId, getLocalizedString(getSession().getLocale(), "images.contenttool.buttons.exportContent"), "tool.contenttool.exportContent.header");
        ImageButton importButton = new ImageButton("ImportContent!input.action?parentContentId=" + this.contentId + "&repositoryId=" + this.repositoryId, getLocalizedString(getSession().getLocale(), "images.contenttool.buttons.importContent"), "tool.contenttool.importContent.header");
        exportButton.getSubButtons().add(importButton);
        buttons.add(exportButton);
      }
    }
    catch(Exception e)
View Full Code Here

    List buttons = new ArrayList();
    try
    {
      buttons.add(getDeleteButton())
     
      ImageButton moveButton = getMoveButton();
      moveButton.getSubButtons().add(getMoveMultipleButton());
      buttons.add(moveButton);
     
      buttons.add(getPublishButton());
      if(hasAnyPublishedVersion())
      {
          ImageButton unpublishButton = getUnpublishButton();
          ImageButton unpublishAllButton = getUnpublishAllButton();
          unpublishButton.getSubButtons().add(unpublishAllButton);
     
          buttons.add(unpublishButton);
      }
     
      if(this.contentVO.getIsProtected().intValue() == ContentVO.YES.intValue())
      {
          ImageButton accessRightsButton = getAccessRightsButton();
        buttons.add(accessRightsButton);
      }

      if(this.contentVO.getContentTypeDefinitionId() != null)
      {
        ContentTypeDefinitionVO contentTypeDefinitionVO = ContentTypeDefinitionController.getController().getContentTypeDefinitionVOWithId(this.contentVO.getContentTypeDefinitionId());
        if(contentTypeDefinitionVO != null && (contentTypeDefinitionVO.getName().equalsIgnoreCase("HTMLTemplate") || contentTypeDefinitionVO.getName().equalsIgnoreCase("PageTemplate") || contentTypeDefinitionVO.getName().equalsIgnoreCase("PagePartTemplate")))
        {
          buttons.add(getComponentAccessRightsButton());
          buttons.add(getDeployComponentButton());
        }
      }
     
      buttons.add(new ImageButton("ViewContentVersionHistory.action?contentId=" + this.contentId, getLocalizedString(getSession().getLocale(), "images.contenttool.buttons.viewHistory"), "History", new Integer(22), new Integer(80)));
     
      buttons.add(getSyncTreeButton());
     
      buttons.add(getExecuteTaskButton());
     
      //if(this.getInfoGluePrincipal().getIsAdministrator())
        buttons.add(new ImageButton("UpdateContent!inputContentType.action?contentId=" + this.contentId + "&repositoryId=" + this.repositoryId, getLocalizedString(getSession().getLocale(), "images.contenttool.buttons.changeContentType"), "tool.contenttool.changeContentType.header"));
   
      ImageButton exportButton = new ImageButton("ExportContent!input.action?contentId=" + this.contentId + "&repositoryId=" + this.repositoryId, getLocalizedString(getSession().getLocale(), "images.contenttool.buttons.exportContent"), "tool.contenttool.exportContent.header");
      ImageButton importButton = new ImageButton("ImportContent!input.action?parentContentId=" + this.contentId + "&repositoryId=" + this.repositoryId, getLocalizedString(getSession().getLocale(), "images.contenttool.buttons.importContent"), "tool.contenttool.importContent.header");
      exportButton.getSubButtons().add(importButton);
      buttons.add(exportButton);
   
    }
    catch(Exception e)
View Full Code Here

        buttons.add(getDeleteButton());
         
          if(this.contentVersionId != null)
        {
              if(!isReadOnly())
            buttons.add(new ImageButton(true, "javascript:openPopup('ViewDigitalAsset.action?contentVersionId=" + this.contentVersionId + "', 'FileUpload', 'width=400,height=200,resizable=no');", getLocalizedString(getSession().getLocale(), "images.contenttool.buttons.newAsset"), "tool.contenttool.uploadDigitalAsset.header"))
                 
          if(hasPublishedVersion())
          {
              ImageButton unpublishButton = getUnpublishButton();
              ImageButton unpublishAllButton = getUnpublishAllButton();
              unpublishButton.getSubButtons().add(unpublishAllButton);

              buttons.add(unpublishButton);
          }
           
          if(!isReadOnly())
            buttons.add(getPublishButton());
         
          if(this.contentVO.getIsProtected().intValue() == ContentVO.YES.intValue())
          {
              ImageButton accessRightsButton = getAccessRightsButton();
              accessRightsButton.getSubButtons().add(getContentVersionAccessRightsButton());
             
            buttons.add(accessRightsButton);
          }
 
          if(this.contentVO.getContentTypeDefinitionId() != null)
          {
            ContentTypeDefinitionVO contentTypeDefinitionVO = ContentTypeDefinitionController.getController().getContentTypeDefinitionVOWithId(this.contentVO.getContentTypeDefinitionId());
            if(contentTypeDefinitionVO != null && (contentTypeDefinitionVO.getName().equalsIgnoreCase("HTMLTemplate") || contentTypeDefinitionVO.getName().equalsIgnoreCase("PageTemplate") || contentTypeDefinitionVO.getName().equalsIgnoreCase("PagePartTemplate")))
            {
              List interceptionPointVOList = InterceptionPointController.getController().getInterceptionPointVOList("Component");
              if(interceptionPointVOList != null && interceptionPointVOList.size() > 0)
                buttons.add(getComponentAccessRightsButton());
             
              buttons.add(getDeployComponentButton());
            }
          }

          if(this.siteNodeId != null)
          {
            RepositoryVO repositoryVO = RepositoryController.getController().getRepositoryVOWithId(this.repositoryId);
 
            String dnsName = repositoryVO.getDnsName();
 
              String workingUrl = null;
             
              String keyword = "working=";
              int startIndex = (dnsName == null) ? -1 : dnsName.indexOf(keyword);
              if(startIndex != -1)
              {
                  int endIndex = dnsName.indexOf(",", startIndex);
                if(endIndex > -1)
                      dnsName = dnsName.substring(startIndex, endIndex);
                  else
                      dnsName = dnsName.substring(startIndex);
               
                String hostName = dnsName.split("=")[1];
                if(hostName.indexOf("localhost") == -1)
                  workingUrl = hostName + CmsPropertyHandler.getComponentRendererUrl() + "ViewPage.action";
                else
                  workingUrl = CmsPropertyHandler.getComponentRendererUrl() + "ViewPage.action";
              }
              else
              {
                  workingUrl = CmsPropertyHandler.getPreviewDeliveryUrl();
              }
             
              ImageButton previewSiteButton = new ImageButton(true, "javascript:openPopup('" + workingUrl + "?siteNodeId=" + this.siteNodeId + "&languageId=" + this.languageId + "', 'SitePreview', 'width=800,height=600,resizable=yes,toolbar=yes,scrollbars=yes,status=yes,location=yes,menubar=yes');", getLocalizedString(getSession().getLocale(), "images.contenttool.buttons.previewSite"), "tool.contenttool.previewSite.header");
            ImageButton previewContentButton = new ImageButton(true, "javascript:openPopup('ViewContentVersion!preview.action?contentVersionId=" + this.contentVersionId + "&contentId=" + this.contentId + "&languageId=" + this.languageId + "', 'ContentPreview', 'width=800,height=600,resizable=yes,toolbar=yes,scrollbars=yes,status=yes,location=yes,menubar=yes');", getLocalizedString(getSession().getLocale(), "images.contenttool.buttons.previewContent"), "tool.contenttool.previewContent.header")
            previewSiteButton.getSubButtons().add(previewContentButton);
 
            buttons.add(previewSiteButton);     
          }
View Full Code Here

    return buttons;       
  }

  private ImageButton getCompareButton()
  {
      return new ImageButton(true, "javascript:compareVersions('contentVersion');", getLocalizedString(getSession().getLocale(), "images.contenttool.buttons.compareVersions"), "tool.contenttool.compareVersions.header");
   
      //return new ImageButton(true, "javascript:openPopup('ViewContentVersionDifference.action?contentId=" + this.contentId + "&repositoryId=" + this.repositoryId + "&hideLeafs=true', 'MoveContent', 'width=400,height=600,resizable=no');", getLocalizedString(getSession().getLocale(), "images.contenttool.buttons.moveContent"), "tool.contenttool.moveContent.header"); 
  }
View Full Code Here

 
  private ImageButton getCoverButton()
  {
    try
    {
      return new ImageButton("ViewContent.action?contentId=" + this.contentId + "&stay=true", getLocalizedString(getSession().getLocale(), "images.contenttool.buttons.contentCover"), "tool.contenttool.contentDetailsHeader");
    }
    catch(Exception e){}

    return null;
  }
View Full Code Here

TOP

Related Classes of org.infoglue.cms.applications.common.ImageButton

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.