<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">/*
  Copyright (c) 2012 Novell, Inc. All Rights Reserved.

  Novell grants permission, free of charge, to any person obtaining copies
  of this software and its associated documentation files (the "Software"),
  to deal in the Software without restriction, including to use, copy, adapt, 
  publish, distribute, display, perform, sublicense, and sell copies of the 
  Software, subject to the following condition: You must include the above 
  copyright notice and this permission notice in all full or partial copies 
  of the Software.

  NOVELL PROVIDES THE SOFTWARE "AS IS," WITHOUT ANY EXPRESS OR IMPLIED WARRANTY,
  INCLUDING WITHOUT THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A 
  PARTICULAR PURPOSE, AND NON-INFRINGMENT.  NOVELL, THE AUTHORS OF THE SOFTWARE,
  AND THE OWNERS OF COPYRIGHT IN THE SOFTWARE ARE NOT LIABLE FOR ANY CLAIM, DAMAGES,
  OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT, OR OTHERWISE, ARISING
  FROM, OUT OF, OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  THE SOFTWARE.
 */


package com.novell.nam.custom.policy.data;


import com.novell.nxpe.NxpeContextDataElement;
import com.novell.nxpe.NxpeContextDataElementFactory;
import com.novell.nxpe.NxpeException;

public class NameAttributeFromMailIDFactory implements
		NxpeContextDataElementFactory {

	/* Return the instance of your Data element class.
	 * This will be call each time when a attribute is requested.
	 */
	@Override
	public NxpeContextDataElement getInstance(
				String name, 
				int enumerationValue, 
				String parameter)
			throws NxpeException {
		return new NameAttributeFromMailID(name, enumerationValue, parameter);

	}

	/* Return the same instance of your Data element class.
	 * This will be call each time when a attribute is requested and 
	 * the same instance is returned everytime.
	 */
	/*  Uncomment the below code to enable single instance of the 
	 *  data element class to fetch external attribute.
	 *
	private static NameAttributeFromMailID dataElement = null;

	@Override
	public NxpeContextDataElement getInstance(
				String name, 
				int enumerationValue, 
				String parameter)
			throws NxpeException {
		if ( dataElement == null )
			dataElement = new NameAttributeFromMailID(name, enumerationValue, parameter);

		return dataElement;
	}
	*/

}
</pre></body></html>