container/profiles/src/main/java/org/mobicents/slee/container/deployment/profile/SleeProfileClassCodeGenerator.java
public static int checkCombination(ProfileSpecificationComponent component)
  {
    Object profileCmpInterface = component.getDescriptor().getProfileCMPInterface();
    Object profileManagementInterface = component.getDescriptor().getProfileManagementInterface();
    Object profileManagementAbstractClass = component.getDescriptor().getProfileAbstractClass();
    //Object profileManagementLocalObjectInterface = compoenent.getDescriptor().getProfileLocalInterface();
    // if the Profile Specification has no Profile CMP interface, it is incorrect
    if (profileCmpInterface == null)
      return -1;

//    if (compoenent.isSlee11()) {
//      if (profileCmpInterface != null && profileManagementLocalObjectInterface != null && profileManagementAbstractClass != null)
//        return 4;
//      if (profileCmpInterface != null && profileManagementAbstractClass != null)
//        return 3;
//      if (profileCmpInterface != null && profileManagementLocalObjectInterface != null)
//        return 2;
//
//      return 1;
//    }
//    else
//    {
      if (profileCmpInterface != null && profileManagementInterface != null && profileManagementAbstractClass != null)
        return 4;
      if (profileCmpInterface != null && profileManagementAbstractClass != null)
        return 3;
      if (profileCmpInterface != null && profileManagementInterface != null)
        return 2;

      return 1;
//    }
  }
public static int checkCombination(ProfileSpecificationComponent component)
  {
    Object profileCmpInterface = component.getDescriptor().getProfileCMPInterface();
    Object profileManagementInterface = component.getDescriptor().getProfileManagementInterface();
    Object profileManagementAbstractClass = component.getDescriptor().getProfileAbstractClass();
    //Object profileManagementLocalObjectInterface = compoenent.getDescriptor().getProfileLocalInterface();
    // if the Profile Specification has no Profile CMP interface, it is incorrect
    if (profileCmpInterface == null)
      return -1;

//    if (compoenent.isSlee11()) {
//      if (profileCmpInterface != null && profileManagementLocalObjectInterface != null && profileManagementAbstractClass != null)
//        return 4;
//      if (profileCmpInterface != null && profileManagementAbstractClass != null)
//        return 3;
//      if (profileCmpInterface != null && profileManagementLocalObjectInterface != null)
//        return 2;
//
//      return 1;
//    }
//    else
//    {
      if (profileCmpInterface != null && profileManagementInterface != null && profileManagementAbstractClass != null)
        return 4;
      if (profileCmpInterface != null && profileManagementAbstractClass != null)
        return 3;
      if (profileCmpInterface != null && profileManagementInterface != null)
        return 2;

      return 1;
//    }
  }
public static int checkCombination ( ProfileSpecificationComponent component ) { Object profileCmpInterface = component . getDescriptor ( ) . getProfileCMPInterface ( ) ; Object profileManagementInterface = component . getDescriptor ( ) . getProfileManagementInterface ( ) ; Object profileManagementAbstractClass = component . getDescriptor ( ) . getProfileAbstractClass ( ) ; //Object profileManagementLocalObjectInterface = compoenent.getDescriptor().getProfileLocalInterface();
 // if the Profile Specification has no Profile CMP interface, it is incorrect
 if ( profileCmpInterface == null ) return - 1 ; //    if (compoenent.isSlee11()) {
 //      if (profileCmpInterface != null && profileManagementLocalObjectInterface != null && profileManagementAbstractClass != null)
 //        return 4;
 //      if (profileCmpInterface != null && profileManagementAbstractClass != null)
 //        return 3;
 //      if (profileCmpInterface != null && profileManagementLocalObjectInterface != null)
 //        return 2;
 //
 //      return 1;
 //    }
 //    else
 //    {
 if ( profileCmpInterface != null && profileManagementInterface != null && profileManagementAbstractClass != null ) return 4 ; if ( profileCmpInterface != null && profileManagementAbstractClass != null ) return 3 ; if ( profileCmpInterface != null && profileManagementInterface != null ) return 2 ; return 1 ; //    }
 }
Check which combination (see JSLEE 1.0 spec section 10.5.2) matches the
Sbb Developer's Profile Specification

@param profileCMPInterfaceName
name of the Profile CMP interface
@param profileManagementInterfaceName
name of the Profile Management interface
@param profileManagementAbstractClassName
name of the Profile Management Abstract class
@return the number of the combination (see JSLEE 1.0 spec section 10.5.2
or 10.5.1.2 in JSLEE 1.1 spec), -1 if it doesn't match no
combination<br>
<ul>
<li><b>1</b> - all cmp fields are exposed to management client and SLEE components(for SLEE as read only), no managemetn methods</li>
<li><b>2</b> - ony double defined CMP accessors and management methods are visible</li>
<li><b>3</b></li>
<li><b>4</b></li>
<li><b>-1</b> - when error occurs, no definitions</li>
</ul>
Check which combination ( see JSLEE 1 . 0 spec section 10 . 5 . 2 ) matches the Sbb Developer s Profile Specification