@SuppressWarnings("rawtypes")
	public static int prepareCollectionDataInContext(
			final String[] varparts, final Collection collection,
			final Map<String, Object> dataContext) {
		if (varparts.length == TieConstants.DEFAULT_COMMAND_PART_LENGTH) {
			int collectionIndex = Integer.parseInt(varparts[2]);
			Object obj = ConfigurationUtility
					.findItemInCollection(collection, collectionIndex);
			if (obj != null) {
				dataContext.put(varparts[1], obj);
				return collectionIndex;
			}
		}
		return -1;
	}
@ SuppressWarnings ( "rawtypes" ) public static int prepareCollectionDataInContext ( final String [ ] varparts , final Collection collection , final Map < String , Object > dataContext ) { if ( varparts . length == TieConstants . DEFAULT_COMMAND_PART_LENGTH ) { int collectionIndex = Integer . parseInt ( varparts [ 2 ] ) ; Object obj = ConfigurationUtility . findItemInCollection ( collection , collectionIndex ) ; if ( obj != null ) { dataContext . put ( varparts [ 1 ] , obj ) ; return collectionIndex ; } } return - 1 ; }
Prepare collection data in context.

@param varparts
the varparts
@param collection
the collection
@param dataContext
the data context
@return the int