001 /* 002 * JBoss DNA (http://www.jboss.org/dna) 003 * See the COPYRIGHT.txt file distributed with this work for information 004 * regarding copyright ownership. Some portions may be licensed 005 * to Red Hat, Inc. under one or more contributor license agreements. 006 * See the AUTHORS.txt file in the distribution for a full listing of 007 * individual contributors. 008 * 009 * JBoss DNA is free software. Unless otherwise indicated, all code in JBoss DNA 010 * is licensed to you under the terms of the GNU Lesser General Public License as 011 * published by the Free Software Foundation; either version 2.1 of 012 * the License, or (at your option) any later version. 013 * 014 * JBoss DNA is distributed in the hope that it will be useful, 015 * but WITHOUT ANY WARRANTY; without even the implied warranty of 016 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 017 * Lesser General Public License for more details. 018 * 019 * You should have received a copy of the GNU Lesser General Public 020 * License along with this software; if not, write to the Free 021 * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 022 * 02110-1301 USA, or see the FSF site: http://www.fsf.org. 023 */ 024 package org.jboss.dna.connector.jdbc; 025 026 import java.sql.Connection; 027 import java.util.UUID; 028 import org.jboss.dna.common.util.Logger; 029 import org.jboss.dna.graph.ExecutionContext; 030 import org.jboss.dna.graph.property.DateTime; 031 import org.jboss.dna.graph.request.CloneWorkspaceRequest; 032 import org.jboss.dna.graph.request.CopyBranchRequest; 033 import org.jboss.dna.graph.request.CreateNodeRequest; 034 import org.jboss.dna.graph.request.CreateWorkspaceRequest; 035 import org.jboss.dna.graph.request.DeleteBranchRequest; 036 import org.jboss.dna.graph.request.DestroyWorkspaceRequest; 037 import org.jboss.dna.graph.request.GetWorkspacesRequest; 038 import org.jboss.dna.graph.request.MoveBranchRequest; 039 import org.jboss.dna.graph.request.ReadAllChildrenRequest; 040 import org.jboss.dna.graph.request.ReadAllPropertiesRequest; 041 import org.jboss.dna.graph.request.UpdatePropertiesRequest; 042 import org.jboss.dna.graph.request.VerifyWorkspaceRequest; 043 import org.jboss.dna.graph.request.processor.RequestProcessor; 044 045 /** 046 * JDBC request processor 047 * 048 * @author <a href="mailto:litsenko_sergey@yahoo.com">Sergiy Litsenko</a> 049 */ 050 public class JdbcRequestProcesor extends RequestProcessor { 051 protected Connection connection; 052 protected UUID rootNodeUuid; 053 054 /** 055 * Logging for this instance 056 */ 057 protected Logger log = Logger.getLogger(getClass()); 058 059 /** 060 * @param sourceName 061 * @param context 062 * @param connection 063 * @param rootNodeUuid 064 */ 065 public JdbcRequestProcesor( String sourceName, 066 ExecutionContext context, 067 Connection connection, 068 UUID rootNodeUuid ) { 069 super(sourceName, context); 070 this.connection = connection; 071 this.rootNodeUuid = rootNodeUuid; 072 } 073 074 /** 075 * @param sourceName 076 * @param context 077 * @param connection 078 * @param rootNodeUuid 079 * @param now 080 */ 081 public JdbcRequestProcesor( String sourceName, 082 ExecutionContext context, 083 Connection connection, 084 UUID rootNodeUuid, 085 DateTime now ) { 086 super(sourceName, context, now); 087 this.connection = connection; 088 this.rootNodeUuid = rootNodeUuid; 089 } 090 091 /** 092 * {@inheritDoc} 093 * 094 * @see org.jboss.dna.graph.request.processor.RequestProcessor#process(org.jboss.dna.graph.request.CopyBranchRequest) 095 */ 096 @Override 097 public void process( CopyBranchRequest request ) { 098 } 099 100 /** 101 * {@inheritDoc} 102 * 103 * @see org.jboss.dna.graph.request.processor.RequestProcessor#process(org.jboss.dna.graph.request.CreateNodeRequest) 104 */ 105 @Override 106 public void process( CreateNodeRequest request ) { 107 } 108 109 /** 110 * {@inheritDoc} 111 * 112 * @see org.jboss.dna.graph.request.processor.RequestProcessor#process(org.jboss.dna.graph.request.DeleteBranchRequest) 113 */ 114 @Override 115 public void process( DeleteBranchRequest request ) { 116 } 117 118 /** 119 * {@inheritDoc} 120 * 121 * @see org.jboss.dna.graph.request.processor.RequestProcessor#process(org.jboss.dna.graph.request.MoveBranchRequest) 122 */ 123 @Override 124 public void process( MoveBranchRequest request ) { 125 } 126 127 /** 128 * {@inheritDoc} 129 * 130 * @see org.jboss.dna.graph.request.processor.RequestProcessor#process(org.jboss.dna.graph.request.ReadAllChildrenRequest) 131 */ 132 @Override 133 public void process( ReadAllChildrenRequest request ) { 134 } 135 136 /** 137 * {@inheritDoc} 138 * 139 * @see org.jboss.dna.graph.request.processor.RequestProcessor#process(org.jboss.dna.graph.request.ReadAllPropertiesRequest) 140 */ 141 @Override 142 public void process( ReadAllPropertiesRequest request ) { 143 } 144 145 /** 146 * {@inheritDoc} 147 * 148 * @see org.jboss.dna.graph.request.processor.RequestProcessor#process(org.jboss.dna.graph.request.UpdatePropertiesRequest) 149 */ 150 @Override 151 public void process( UpdatePropertiesRequest request ) { 152 } 153 154 /** 155 * {@inheritDoc} 156 * 157 * @see org.jboss.dna.graph.request.processor.RequestProcessor#process(org.jboss.dna.graph.request.VerifyWorkspaceRequest) 158 */ 159 @Override 160 public void process( VerifyWorkspaceRequest request ) { 161 } 162 163 /** 164 * {@inheritDoc} 165 * 166 * @see org.jboss.dna.graph.request.processor.RequestProcessor#process(org.jboss.dna.graph.request.GetWorkspacesRequest) 167 */ 168 @Override 169 public void process( GetWorkspacesRequest request ) { 170 } 171 172 /** 173 * {@inheritDoc} 174 * 175 * @see org.jboss.dna.graph.request.processor.RequestProcessor#process(org.jboss.dna.graph.request.CreateWorkspaceRequest) 176 */ 177 @Override 178 public void process( CreateWorkspaceRequest request ) { 179 } 180 181 /** 182 * {@inheritDoc} 183 * 184 * @see org.jboss.dna.graph.request.processor.RequestProcessor#process(org.jboss.dna.graph.request.CloneWorkspaceRequest) 185 */ 186 @Override 187 public void process( CloneWorkspaceRequest request ) { 188 } 189 190 /** 191 * {@inheritDoc} 192 * 193 * @see org.jboss.dna.graph.request.processor.RequestProcessor#process(org.jboss.dna.graph.request.DestroyWorkspaceRequest) 194 */ 195 @Override 196 public void process( DestroyWorkspaceRequest request ) { 197 } 198 }