status = objectSubscriber_.publishChange( asset );
objectSubscriber_.publishChange( asset );
   private boolean modifyObject( Class className, Object asset )   {      Method method        = null;      Class[] methodParams = null;      Object[] params      = null;      Object property      = null;      Object accessor      = null;      String assetId       = null;      String methodName    = null;      boolean status       = false;      String startString   = getStartDate();      String endString     = getEndDate();      String prop          = getProperty();      try      {         if ( prop != null )         {            methodName = GET_PREFIX + getProperty();            property = reflectAndInvoke( className, asset, methodName,                                        methodParams, methodParams );		 if ( property != null )            {               // Get the field accessor method and invoke it to set the               // new value.	            System.out.println("\n<<<PerturbationPlugin>>> Perturbation " +                     " on asset with item_id " + getItemId() + " of Cluster " +                  " with UIC " + getUIC() + " ....Beginning.....");			               methodName = SET_PREFIX + getField();		               // Get the methods parameter data type, and                // instantiate and instance of it.               if (getValueType().equalsIgnoreCase(STRING))               {                  Class str = Class.forName( stringClass );                  methodParams = new Class[1];                  methodParams[0] = str;                  Constructor constructor = str.getConstructor( methodParams );                  params = new Object[1];                  params[0] = getValue();                  Object objType = constructor.newInstance( params );	                  params[0] = objType;               }               else if (getValueType().equalsIgnoreCase(BOOLEAN))               {                  methodParams = new Class[1];                  methodParams[0] = Boolean.TYPE;                  params = new Object[1];         			if (getValue().toLowerCase().equals("true"))                     params[0] = Boolean.TRUE;                  else                     params[0] = Boolean.FALSE;               }               // Invoke the method.               accessor = reflectAndInvoke( property.getClass(), property,                                             methodName, methodParams, params );				               // Publish change               objectSubscriber_.openTransaction();               status = objectSubscriber_.publishChange( asset );               objectSubscriber_.closeTransaction( false );				                // For testing....               methodName = GET_PREFIX + getField();               methodParams = null;               method = ( property.getClass() ).getMethod ( methodName,                                                            methodParams );					                              System.out.println("\n<<<PerturbationPlugin>>> " +                  "UIC: " + getUIC() + ", item_id: " + getItemId() + "\n" +                  getField() + " Field of Property " + getProperty() +                  " has been changed to " +                   method.invoke( property, methodParams) );            }         }         if ( !( startString.equals( "" ) ) || !( endString.equals( "" ) ) )         {            DateFormat df = DateFormat.getDateInstance( DateFormat.SHORT );            RoleSchedule rs = ( (Asset)asset).getRoleSchedule();            Schedule s = ( (RoleScheduleImpl) rs).getAvailableSchedule();            Date new_start_date = ( (ScheduleImpl)s )                                        .getStartDate();            Date new_end_date = ( (ScheduleImpl)s )                                        .getEndDate();            if ( !startString.equals( "" ) )               new_start_date = df.parse(startString);            if ( !endString.equals( "" ) )               new_end_date = df.parse(endString);				            RootFactory ldmf = pertPlugin_.getMyRootFactory();            Schedule sched = ldmf.newSimpleSchedule( new_start_date,                                                     new_end_date);            ( (RoleScheduleImpl) rs).setAvailableSchedule( sched );            // Publish change            objectSubscriber_.openTransaction();            status = objectSubscriber_.publishChange( asset );            objectSubscriber_.closeTransaction( false );            //For testing...            Date start = ( ( Asset ) asset ).getRoleSchedule().                           getAvailableSchedule().getStartDate();            Date end = ( ( Asset ) asset).getRoleSchedule().                           getAvailableSchedule().getEndDate();            System.out.println("\n<<<PerturbationPlugin>>> " +               "The available schedule for asset with item_id: " +               getItemId() + ", from cluster with UIC: " + getUIC() +               "has changed...\n" + "AVAILABLE SCHEDULE:\n" +                start	+ ":" + end );         }           }      catch ( NoSuchMethodException nsme )      {         System.out.println("\n<<<PerturbationPlugin>>> PERTURBATION " +            "ERROR::UIC: " + getUIC() + ", item_id: " + getItemId() + "\n" +              nsme.toString());      }      catch ( Exception exception )      {         System.out.println("\n<<<PerturbationPlugin>>> PERTURBATION "            + "ERROR::UIC: " + getUIC() + ", item_id: " + getItemId() +            "\n" + exception.toString() );         exception.printStackTrace();      }      return status;   }