001/* 002 * ModeShape (http://www.modeshape.org) 003 * 004 * Licensed under the Apache License, Version 2.0 (the "License"); 005 * you may not use this file except in compliance with the License. 006 * You may obtain a copy of the License at 007 * 008 * http://www.apache.org/licenses/LICENSE-2.0 009 * 010 * Unless required by applicable law or agreed to in writing, software 011 * distributed under the License is distributed on an "AS IS" BASIS, 012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 013 * See the License for the specific language governing permissions and 014 * limitations under the License. 015 */ 016package org.modeshape.web.client.admin; 017 018import com.smartgwt.client.widgets.layout.VLayout; 019import org.modeshape.web.client.Console; 020import org.modeshape.web.client.JcrServiceAsync; 021 022/** 023 * @author kulikov 024 */ 025public class AdminView extends VLayout { 026 027 private final Console console; 028 029 public AdminView( Console console) { 030 this.console = console; 031 032 addMember(new BackupControl(this)); 033 addMember(new RestoreControl(this)); 034 addMember(new BackupDownloadControl(this)); 035 addMember(new UploadRestoreControl(this)); 036 addMember(new Metrics(this)); 037 } 038 039 protected Console console() { 040 return console; 041 } 042 043 protected JcrServiceAsync jcrService() { 044 return console.jcrService(); 045 } 046 047 protected String repository() { 048 return console.contents().repository(); 049 } 050 051} 052