protected void configureSecurityController(Secured controllable, String objectName) {
		Assert.notNull(controllable, "controllable");
		Assert.notNull(objectName, "objectName");

		String controllerId = controllable.getSecurityControllerId();

		if (controllerId != null) {
			// Find the referenced controller.

			if (logger.isDebugEnabled()) {
				logger.debug("Lookup SecurityController with id [" + controllerId + "]");
			}

			SecurityController controller = getSecurityControllerManager().getSecurityController(controllerId);

			// And add the object to the controlled object set
			if (controller != null) {
				if (logger.isDebugEnabled()) {
					logger.debug("configuring SecurityControllable [" + objectName + "]; security controller id='"
							+ controllerId + "'");
				}
				controller.addControlledObject(controllable);
			}
			else {
				if (logger.isDebugEnabled()) {
					logger.debug("configuring SecurityControllable [" + objectName
							+ "]; no security controller for id='" + controllerId + "'");
				}
			}
		}
		else {

			if (logger.isDebugEnabled()) {
				logger.debug("configuring SecurityControllable [" + objectName
						+ "]; no security controller Id specified");
			}

		}

	}
protected void configureSecurityController ( Secured controllable , String objectName ) { Assert . notNull ( controllable , "controllable" ) ; Assert . notNull ( objectName , "objectName" ) ; String controllerId = controllable . getSecurityControllerId ( ) ; if ( controllerId != null ) { if ( logger . isDebugEnabled ( ) ) { logger . debug ( "Lookup SecurityController with id [" + controllerId + "]" ) ; } SecurityController controller = getSecurityControllerManager ( ) . getSecurityController ( controllerId ) ; if ( controller != null ) { if ( logger . isDebugEnabled ( ) ) { logger . debug ( "configuring SecurityControllable [" + objectName + "]; security controller id='" + controllerId + "'" ) ; } controller . addControlledObject ( controllable ) ; } else { if ( logger . isDebugEnabled ( ) ) { logger . debug ( "configuring SecurityControllable [" + objectName + "]; no security controller for id='" + controllerId + "'" ) ; } } } else { if ( logger . isDebugEnabled ( ) ) { logger . debug ( "configuring SecurityControllable [" + objectName + "]; no security controller Id specified" ) ; } } }
Associates the given object with a security controller if it implements
the {@link Secured} interface.
@param controllable The object to be configured.
@param objectName The name (id) of the object.
@throws org.springframework.beans.BeansException if a referenced security controller is not found
or is of the wrong type