ome.services.licenses
Class LicenseWiring

java.lang.Object
  extended by ome.logic.HardWiredInterceptor
      extended by ome.services.licenses.LicenseWiring
All Implemented Interfaces:
Advice, Interceptor, MethodInterceptor

public class LicenseWiring
extends HardWiredInterceptor

Responsible for enforcing a generic licensing policy:

This HardWiredInterceptor subclass gets compiled in via the build system.

Since:
3.0-Beta2
Author:
Josh Moore, josh at glencoesoftware.com
See Also:
HardWiredInterceptor, ome.tools.spring.AOPAdapter

Constructor Summary
LicenseWiring()
           
 
Method Summary
 String getName()
          Can be implemented by all subclasses, so that they can configure themselves in HardWiredInterceptor.selfConfigure(OmeroContext).
 Object handleILicense(MethodInvocation mi, Principal p)
          This method implements special handling for calls to ILicense.
 Object invoke(MethodInvocation mi)
          Interceptor method which enforces the LicenseWiring policy.
 
Methods inherited from class ome.logic.HardWiredInterceptor
configure, getPrincipal, getServiceFactory, hasPassword, initializeUserAttributes, parse, selfConfigure
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LicenseWiring

public LicenseWiring()
Method Detail

getName

public String getName()
Description copied from class: HardWiredInterceptor
Can be implemented by all subclasses, so that they can configure themselves in HardWiredInterceptor.selfConfigure(OmeroContext). If the method returns null, HardWiredInterceptor.selfConfigure(OmeroContext) will not run.

Overrides:
getName in class HardWiredInterceptor

handleILicense

public Object handleILicense(MethodInvocation mi,
                             Principal p)
                      throws Throwable
This method implements special handling for calls to ILicense. Originally, it was required to use ILicense directly. That is now largely deprecated in favor of letting the session code handle it. Calls may however, still be made to ILicense, and we should handle those properly.

Throws:
Throwable

invoke

public Object invoke(MethodInvocation mi)
              throws Throwable
Interceptor method which enforces the LicenseWiring policy.

Throws:
Throwable


OmeroJava Api

Version: Beta-4.2.0-r7571-b29

Copyright © 2009 The University of Dundee. All Rights Reserved.