001/*
002 * (C) Copyright 2006-2007 Nuxeo SAS (http://nuxeo.com/) and contributors.
003 *
004 * All rights reserved. This program and the accompanying materials
005 * are made available under the terms of the GNU Lesser General Public License
006 * (LGPL) version 2.1 which accompanies this distribution, and is available at
007 * http://www.gnu.org/licenses/lgpl.html
008 *
009 * This library is distributed in the hope that it will be useful,
010 * but WITHOUT ANY WARRANTY; without even the implied warranty of
011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
012 * Lesser General Public License for more details.
013 *
014 * Contributors:
015 *     Nuxeo - initial API and implementation
016 *
017 */
018package org.nuxeo.ecm.automation.seam.operations;
019
020import org.nuxeo.ecm.automation.OperationContext;
021import org.nuxeo.ecm.automation.core.Constants;
022import org.nuxeo.ecm.automation.core.annotations.Context;
023import org.nuxeo.ecm.automation.core.annotations.Operation;
024import org.nuxeo.ecm.automation.core.annotations.OperationMethod;
025import org.nuxeo.ecm.automation.core.annotations.Param;
026
027/**
028 * Cleanup Seam context
029 *
030 * @author Tiry (tdelprat@nuxeo.com)
031 */
032@Operation(id = DestroySeamContext.ID, category = Constants.CAT_UI, label = "Destroy Seam Context", description = "Cleanup up Seam context", aliases = { "Seam.DestroyContext" })
033public class DestroySeamContext {
034
035    public static final String ID = "WebUI.DestroySeamContext";
036
037    @Param(name = "conversationId", required = false)
038    protected String conversationId;
039
040    @Context
041    protected OperationContext context;
042
043    @OperationMethod
044    public void run() {
045        SeamOperationFilter.handleAfterRun(context, conversationId);
046    }
047
048}