/* =============================================================================== * * Part of the InfoGlue Content Management Platform (www.infoglue.org) * * =============================================================================== * * Copyright (C) * * This program is free software; you can redistribute it and/or modify it under * the terms of the GNU General Public License version 2, as published by the * Free Software Foundation. See the file LICENSE.html for more information. * * This program is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY, including the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along with * this program; if not, write to the Free Software Foundation, Inc. / 59 Temple * Place, Suite 330 / Boston, MA 02111-1307 / USA. * * =============================================================================== */ package org.infoglue.cms.applications.contenttool.actions; import org.apache.log4j.Logger; import org.infoglue.cms.applications.common.VisualFormatter; import org.infoglue.cms.applications.common.actions.InfoGlueAbstractAction; import org.infoglue.cms.controllers.kernel.impl.simple.ContentController; import org.infoglue.cms.entities.content.ContentVO; /** * This class implements the action class for the framed page in the content tool. * * @author Mattias Bogeblad */ public class ViewContentToolAjaxServicesAction extends InfoGlueAbstractAction { private final static Logger logger = Logger.getLogger(ViewContentToolAjaxServicesAction.class.getName()); private static final long serialVersionUID = 1L; //All id's that are used private Integer repositoryId = null; private Integer contentId = null; private ContentVO contentVO = null; private VisualFormatter formatter = new VisualFormatter(); /** * This execute method first of all gets the id of the available service-binding * the meta-info-content-type has. Then we check if there is a meta-info allready bound. */ public String doExecute() throws Exception { if(contentId != null) { this.contentVO = ContentController.getContentController().getContentVOWithId(contentId); this.repositoryId = this.contentVO.getRepositoryId(); } return "success"; } public Integer getRepositoryId() { return this.repositoryId; } public void setRepositoryId(Integer repositoryId) { this.repositoryId = repositoryId; } public Integer getContentId() { return this.contentId; } public void setContentId(Integer contentId) { this.contentId = contentId; } public ContentVO getContentVO() { return contentVO; } }