@@ -406,8 +406,6 @@ public static void setupParameters(BaseCmd cmd, Map<String, String> params, List
406406 if ((parameterAnnotation == null ) || !parameterAnnotation .expose ()) {
407407 continue ;
408408 }
409- // APITODO Will remove this
410- IdentityMapper identityMapper = field .getAnnotation (IdentityMapper .class );
411409
412410 //ACL checkAccess = field.getAnnotation(ACL.class);
413411
@@ -423,7 +421,7 @@ public static void setupParameters(BaseCmd cmd, Map<String, String> params, List
423421
424422 // marshall the parameter into the correct type and set the field value
425423 try {
426- setFieldValue (field , cmd , paramObj , parameterAnnotation , identityMapper );
424+ setFieldValue (field , cmd , paramObj , parameterAnnotation );
427425 } catch (IllegalArgumentException argEx ) {
428426 if (s_logger .isDebugEnabled ()) {
429427 s_logger .debug ("Unable to execute API command " + cmd .getCommandName () + " due to invalid value " + paramObj + " for parameter " + parameterAnnotation .name ());
@@ -569,7 +567,7 @@ private static Long translateUuidToInternalId(String uuid, Parameter annotation)
569567 }
570568
571569 @ SuppressWarnings ({ "unchecked" , "rawtypes" })
572- private static void setFieldValue (Field field , BaseCmd cmdObj , Object paramObj , Parameter annotation , IdentityMapper identityMapper ) throws IllegalArgumentException , ParseException {
570+ private static void setFieldValue (Field field , BaseCmd cmdObj , Object paramObj , Parameter annotation ) throws IllegalArgumentException , ParseException {
573571 try {
574572 field .setAccessible (true );
575573 CommandType fieldType = annotation .type ();
@@ -646,13 +644,7 @@ private static void setFieldValue(Field field, BaseCmd cmdObj, Object paramObj,
646644 listParam .add (internalId );
647645 break ;
648646 case LONG : {
649- Long val = null ;
650- if (identityMapper != null )
651- val = s_instance ._identityDao .getIdentityId (identityMapper , token );
652- else
653- val = Long .valueOf (token );
654-
655- listParam .add (val );
647+ listParam .add (Long .valueOf (token ));
656648 }
657649 break ;
658650 case SHORT :
@@ -676,11 +668,7 @@ private static void setFieldValue(Field field, BaseCmd cmdObj, Object paramObj,
676668 field .set (cmdObj , internalId );
677669 break ;
678670 case LONG :
679- // APITODO: Remove identityMapper, simply convert the over the wire param to Long
680- if (identityMapper != null )
681- field .set (cmdObj , s_instance ._identityDao .getIdentityId (identityMapper , paramObj .toString ()));
682- else
683- field .set (cmdObj , Long .valueOf (paramObj .toString ()));
671+ field .set (cmdObj , Long .valueOf (paramObj .toString ()));
684672 break ;
685673 case SHORT :
686674 field .set (cmdObj , Short .valueOf (paramObj .toString ()));
0 commit comments