Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
/*
* Copyright 2010 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
package com.google.web.bindery.requestfactory.server;
import com.google.web.bindery.requestfactory.shared.BaseProxy;
import com.google.web.bindery.requestfactory.shared.Locator;
import com.google.web.bindery.requestfactory.shared.RequestContext;
import com.google.web.bindery.requestfactory.shared.RequestFactory;
import com.google.web.bindery.requestfactory.shared.ServiceLocator;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.lang.reflect.Type;
import java.util.List;
import java.util.Set;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.validation.ConstraintViolation;
/**
* Users that intend to alter how RequestFactory interacts with the domain
* environment can extend this type and provide it to
* {@link ServiceLayer#create(ServiceLayerDecorator...)}. The methods defined in
* this type will automatically delegate to the next decorator or the root
* service object after being processed by{@code create()}.
*/
public class ServiceLayerDecorator extends ServiceLayer {
private static final Logger log = Logger.getLogger(ServiceLayer.class.getName());
/**
* A pointer to the next deepest layer.
*/
ServiceLayer next;
@Override
public T createDomainObject(Class clazz) {
return getNext().createDomainObject(clazz);
}
@Override
public > T createLocator(Class clazz) {
return getNext().createLocator(clazz);
}
@Override
public Object createServiceInstance(Class requestContext) {
return getNext().createServiceInstance(requestContext);
}
@Override
public T createServiceLocator(Class clazz) {
return getNext().createServiceLocator(clazz);
}
@Override
public ClassLoader getDomainClassLoader() {
return getNext().getDomainClassLoader();
}
@Override
public Method getGetter(Class domainType, String property) {
return getNext().getGetter(domainType, property);
}
@Override
public Object getId(Object domainObject) {
return getNext().getId(domainObject);
}
@Override
public Class getIdType(Class domainType) {
return getNext().getIdType(domainType);
}
@Override
public Object getProperty(Object domainObject, String property) {
return getNext().getProperty(domainObject, property);
}
@Override
public Type getRequestReturnType(Method contextMethod) {
return getNext().getRequestReturnType(contextMethod);
}
@Override
public Method getSetter(Class domainType, String property) {
return getNext().getSetter(domainType, property);
}
@Override
public Object getVersion(Object domainObject) {
return getNext().getVersion(domainObject);
}
@Override
public Object invoke(Method domainMethod, Object... args) {
return getNext().invoke(domainMethod, args);
}
@Override
public boolean isLive(Object domainObject) {
return getNext().isLive(domainObject);
}
@Override
public T loadDomainObject(Class clazz, Object domainId) {
return getNext().loadDomainObject(clazz, domainId);
}
@Override
public List