@Override public void callback(final Object response) { callContext.setResult(response); } }, new ErrorCallback<Object>() {
@InterceptedCall(VFSCacheInterceptor.class) Map<String, Object> readAttributes(final Path path) throws UnsupportedOperationException, IllegalArgumentException, IOException;
private void login(final RemoteCallContext callContext) { callContext.proceed(new RemoteCallback<User>() { @Override public void callback(final User response) { securityContext.setCachedUser(response); } }); }
@Override public void aroundInvoke(final RemoteCallContext context) { final Object o = context.getParameters()[0]; if (o instanceof PathFactory.PathImpl && ((PathFactory.PathImpl) o).getAttributes().size() > 0) { context.setResult(((PathFactory.PathImpl) o).getAttributes()); return; } context.proceed(); } }
@Override public void aroundInvoke(final RemoteCallContext callContext) { securityCheck( AnnotationUtils.mergeRoles( roleExtractor, getRestrictedAccessAnnotation(callContext.getTypeAnnotations()), getRestrictedAccessAnnotation(callContext.getAnnotations())), callContext); }
private void setFeatureInterceptors(final Collection<MetaClass> featureInterceptors) { for (final MetaClass featureInterceptor : featureInterceptors) { final Class<? extends Annotation>[] annotations = featureInterceptor.getAnnotation(FeatureInterceptor.class).value(); for (int i = 0; i < annotations.length; i++) { this.featureInterceptors.put(annotations[i], featureInterceptor.asClass()); } } }
private void setStandaloneInterceptors(final Collection<MetaClass> standaloneInterceptors) { for (final MetaClass interceptorClass : standaloneInterceptors) { final InterceptsRemoteCall interceptor = interceptorClass.getAnnotation(InterceptsRemoteCall.class); final Class<?>[] intercepts = interceptor.value(); for (final Class<?> intercept : intercepts) { this.standaloneInterceptors.put(intercept, interceptorClass.asClass()); } } }
private void getUser(final RemoteCallContext context) { if (securityContext.isUserCacheValid()) { context.setResult(securityContext.getCachedUser()); } else { context.proceed(new RemoteCallback<User>() { @Override public void callback(final User response) { securityContext.setCachedUser(response); } }); } }
@Override public void aroundInvoke(final RemoteCallContext context) { final Object o = context.getParameters()[0]; if (o instanceof PathFactory.PathImpl && ((PathFactory.PathImpl) o).getAttributes().size() > 0) { context.setResult(((PathFactory.PathImpl) o).getAttributes()); return; } context.proceed(); } }
private void login(final RemoteCallContext callContext) { callContext.proceed(new RemoteCallback<User>() { @Override public void callback(final User response) { securityContext.setCachedUser(response); } }); }
@Override public void callback(final Object response) { callContext.setResult(response); } }, new ErrorCallback<Object>() {
@Override public void aroundInvoke(final RemoteCallContext callContext) { securityCheck( AnnotationUtils.mergeRoles( roleExtractor, getRestrictedAccessAnnotation(callContext.getTypeAnnotations()), getRestrictedAccessAnnotation(callContext.getAnnotations())), callContext); }
@InterceptedCall(VFSCacheInterceptor.class) Map<String, Object> readAttributes(final Path path) throws UnsupportedOperationException, IllegalArgumentException, IOException;
private void setFeatureInterceptors(final Collection<MetaClass> featureInterceptors) { for (final MetaClass featureInterceptor : featureInterceptors) { final Class<? extends Annotation>[] annotations = featureInterceptor.getAnnotation(FeatureInterceptor.class).value(); for (int i = 0; i < annotations.length; i++) { this.featureInterceptors.put(annotations[i], featureInterceptor.asClass()); } } }
private void setStandaloneInterceptors(final Collection<MetaClass> standaloneInterceptors) { for (final MetaClass interceptorClass : standaloneInterceptors) { final InterceptsRemoteCall interceptor = interceptorClass.getAnnotation(InterceptsRemoteCall.class); final Class<?>[] intercepts = interceptor.value(); for (final Class<?> intercept : intercepts) { this.standaloneInterceptors.put(intercept, interceptorClass.asClass()); } } }
private void logout(final RemoteCallContext callContext) { securityContext.setCachedUser(User.ANONYMOUS); callContext.proceed(); }
private void getUser(final RemoteCallContext context) { if (securityContext.isUserCacheValid()) { context.setResult(securityContext.getCachedUser()); } else { context.proceed(new RemoteCallback<User>() { @Override public void callback(final User response) { securityContext.setCachedUser(response); } }); } }
private void logout(final RemoteCallContext callContext) { securityContext.setCachedUser(User.ANONYMOUS); callContext.proceed(); }