View Javadoc
1   /***************************************************************************
2    * Copyright (C) 2003-2009 eXo Platform SAS.
3    *
4    * This program is free software; you can redistribute it and/or
5    * modify it under the terms of the GNU Affero General Public License
6    * as published by the Free Software Foundation; either version 3
7    * of the License, or (at your option) any later version.
8    *
9    * This program is distributed in the hope that it will be useful,
10   * but WITHOUT ANY WARRANTY; without even the implied warranty of
11   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12   * GNU General Public License for more details.
13   *
14   * You should have received a copy of the GNU General Public License
15   * along with this program; if not, see<http://www.gnu.org/licenses/>.
16   *
17   **************************************************************************/
18  package org.exoplatform.ecm.webui.component.explorer.rightclick.manager;
19  
20  import java.util.Arrays;
21  import java.util.List;
22  
23  import org.exoplatform.ecm.webui.component.explorer.control.filter.CanSetPropertyFilter;
24  import org.exoplatform.ecm.webui.component.explorer.control.filter.IsCheckedOutFilter;
25  import org.exoplatform.ecm.webui.component.explorer.control.filter.IsNotEditingDocumentFilter;
26  import org.exoplatform.ecm.webui.component.explorer.control.filter.IsNotInTrashFilter;
27  import org.exoplatform.ecm.webui.component.explorer.control.filter.IsNotLockedFilter;
28  import org.exoplatform.ecm.webui.component.explorer.control.filter.IsNotParentLockedWhenRenameFilter;
29  import org.exoplatform.ecm.webui.component.explorer.control.filter.IsNotTrashHomeNodeFilter;
30  import org.exoplatform.webui.config.annotation.ComponentConfig;
31  import org.exoplatform.webui.ext.filter.UIExtensionFilter;
32  import org.exoplatform.webui.ext.filter.UIExtensionFilters;
33  import org.exoplatform.webui.ext.manager.UIAbstractManager;
34  import org.exoplatform.webui.ext.manager.UIAbstractManagerComponent;
35  
36  /**
37   * Created by The eXo Platform SARL
38   * Author : Hoang Van Hung
39   *          hunghvit@gmail.com
40   * Aug 6, 2009
41   */
42  @ComponentConfig()
43  public class RenameManageComponent extends UIAbstractManagerComponent {
44  
45   private static final List<UIExtensionFilter> FILTERS
46           = Arrays.asList(new UIExtensionFilter[]{new IsNotInTrashFilter(),
47                                                   new IsNotParentLockedWhenRenameFilter(),
48                                                   new CanSetPropertyFilter(),
49                                                   new IsNotLockedFilter(),
50                                                   new IsCheckedOutFilter(),
51                                                   new IsNotTrashHomeNodeFilter(),
52                                                   new IsNotEditingDocumentFilter()});
53  
54    @UIExtensionFilters
55    public List<UIExtensionFilter> getFilters() {
56      return FILTERS;
57    }
58  
59    @Override
60    public Class<? extends UIAbstractManager> getUIAbstractManagerClass() {
61      return null;
62    }
63  }