Advanced Customization > Business Logic Customization > Options and Variants > Customizing Options and Variants > Windchill Option Set Delegate Framework Customizations > Extend Option Set Delegate > Option Set Assignment Delegate Framework
  
Option Set Assignment Delegate Framework
The option set Assignment Delegate framework provides set of classes with some methods. These classes can be extended and methods can be implemented for customization as required. This delegate will return the option set to be used by the Windchill system. When option set is overridden with a specific version of option set delegate, it will return the overridden version of option set to the Windchill system.
Following are some of the important classes of this framework for customization.
RegisteredOptionSetLink
Out-of-the box association class that associates an OptionSet to an OptionSetAssignable object. With this by default option set gets assigned to an OptionSetAssignable object.
AbstractOptionSetFetcherDelegate
This is an abstract delegate class defined to provide customization capability to UI and processing. This class has following methods which can be implemented to customize logic:
getAssignedOptionSet : This is a abstract method that can be implemented to determine option set for specified object.
isAssignOptionSetAllowed : This is a method that tells the system if custom logic needs the capability of assigning option set to object in user interface. When this is allowed you can use the UI to create RegisteredOptionSetLink association with an object.
RegisteredOptionSetFetcherDelegate
This is the default delegate used Windchill to determine option set for an option set assignable object. This delegate implements getAssignedOptionSet defined by AbstractOptionSetFetcherDelegate. While determining option set this delegate use RegisteredOptionSetLink association to find assigned option set for an object. If no option set for an object is found and if an object is contained, the object will check if option set is available in its container hierarchy. It only considers container for an object that are instance of OptionSetAssignable.
Delegate Framework Classes
com.ptc.windchill.option.delegate.AbstractOptionSetFetcherDelegate
com.ptc.windchill.option.delegate.impl.RegisteredOptionSetFetcherDelegate
com.ptc.windchill.option.delegate.impl.NullOptionSetFetcherDelegate
Please refer to the Windchill Java Documentation for more information about method signature and expected input and output parameters.
Writing custom Delegate
When you are interested in developing your own logic to determine option set you can write new delegate that extends com.ptc.windchill.option.delegate.AbstractOptionSetFetcherDelegate and implement method getAssignedOptionSet. This custom delegate can be registered in system for a specific type of object. With this it is possible to write custom logic for determining option set for out-of-the-box objects or for custom objects.
Extend default registered option set delegate
In order to customize the out-of-the-box logic of the OptionSetDelegate that determines option set for an object in Windchill, you can extend com.ptc.windchill.option.delegate.impl. RegisteredOptionSetFetcherDelegate and override the method getAssignedOptionSet for custom logic. With the extension of this class you can take advantage of both the OOTB delegate and your own business logic.
Procedure
Procedures for extending classes using the Windchill Information Modeler are defined in the Windchill Customization Guide. For simple extensions of the default interface implementation use this process:
1. Define the java source file using the editor or Integrated Development Environment (IDE) of your choice.
* 
Do not modify or replace any classes that were provided when Windchill was installed. These files may be replaced by future software releases.
2. Compile the java source file into the Windchill codebase.
3. Create an XCONF file that contains the appropriate new value for the property to register your delegate in Windchill system.
4. Use the XCONF Manager to update Windchill services properties.
These Windchill properties are defined using the Windchill XCONF feature. See the section Specialized Administration for details about the XCONF files and how to create them.
Example
You have defined a new custom type of part with its own set of business rules. The requirement for this type or its structure is such that it determines the option set with some custom logic. This custom logic does not require any direct association with the part type. Instead it uses some information on a part to determine option set. It also requires that there is no option set determined. Then based on information on the part it expects to use out-of-the box behavior to determine the option set.