dancar
08-20-2008, 08:35 AM
Hi
Is custom attributes handled in the same way in 12.0 as it was in 11.6. I created a DA_CA attribute in 11.6 and as far as I can remember it showed up in the “fulfillment details” dialog. Now when I have done the same thing in 12.0 it doesn’t show.
I have customised the ”Generator for Custom Attributes in Online Response” my generator looks like this:
public class VendorDictResponseGenerator implements VendorDictionaryResponse {
public Map<String, String> getResponseVendorDictionary(FulfillmentRecord fr, boolean isSuccess, FulfillmentRequestTypeENC operationType) throws OperationsException
{
System.out.println("1");
Map<String, String> responseMap = new HashMap<String, String>();
System.out.println("2");
if(fr != null)
{
AttributeSet entAttributes = fr.getLicenseModelAttributes();
System.out.println("3");
Set<CustomAttributeDescriptor> descriptors = (Set<CustomAttributeDescriptor>)entAttributes.getDescriptors();
System.out.println("4");
System.out.println("Number of descriptors: " + descriptors.size());
for(CustomAttributeDescriptor desc : descriptors) {
System.out.println(desc.getName());
if("TAC_HOST_ID".equals(desc.getName())) {
String val = entAttributes.getStringValue(desc);
if(!responseMap.containsKey("TAC_HOST_ID")) {
responseMap.put("TAC_HOST_ID" , val);
}
}
else if("DA_CA".equals(desc.getName())) {
String val = entAttributes.getStringValue(desc);
if(!responseMap.containsKey("DA_CA")) {
responseMap.put("DA_CA" , val);
}
}
}
}
else
{
System.out.println("NO FULLFILLMENT RECORD!!!");
}
System.out.println("5");
return responseMap;
}
}
And the logfile looks like this in 12.0:
1
2
3
4
Number of descriptors: 0
5
And in 11.6:
1
2
3
4
Number of descriptors: 1
5
Has the behaviour changed or have I forgotten to configure something in my 12.0 installation?
Best Regards
Daniel
Is custom attributes handled in the same way in 12.0 as it was in 11.6. I created a DA_CA attribute in 11.6 and as far as I can remember it showed up in the “fulfillment details” dialog. Now when I have done the same thing in 12.0 it doesn’t show.
I have customised the ”Generator for Custom Attributes in Online Response” my generator looks like this:
public class VendorDictResponseGenerator implements VendorDictionaryResponse {
public Map<String, String> getResponseVendorDictionary(FulfillmentRecord fr, boolean isSuccess, FulfillmentRequestTypeENC operationType) throws OperationsException
{
System.out.println("1");
Map<String, String> responseMap = new HashMap<String, String>();
System.out.println("2");
if(fr != null)
{
AttributeSet entAttributes = fr.getLicenseModelAttributes();
System.out.println("3");
Set<CustomAttributeDescriptor> descriptors = (Set<CustomAttributeDescriptor>)entAttributes.getDescriptors();
System.out.println("4");
System.out.println("Number of descriptors: " + descriptors.size());
for(CustomAttributeDescriptor desc : descriptors) {
System.out.println(desc.getName());
if("TAC_HOST_ID".equals(desc.getName())) {
String val = entAttributes.getStringValue(desc);
if(!responseMap.containsKey("TAC_HOST_ID")) {
responseMap.put("TAC_HOST_ID" , val);
}
}
else if("DA_CA".equals(desc.getName())) {
String val = entAttributes.getStringValue(desc);
if(!responseMap.containsKey("DA_CA")) {
responseMap.put("DA_CA" , val);
}
}
}
}
else
{
System.out.println("NO FULLFILLMENT RECORD!!!");
}
System.out.println("5");
return responseMap;
}
}
And the logfile looks like this in 12.0:
1
2
3
4
Number of descriptors: 0
5
And in 11.6:
1
2
3
4
Number of descriptors: 1
5
Has the behaviour changed or have I forgotten to configure something in my 12.0 installation?
Best Regards
Daniel