Package org.metaworks

Examples of org.metaworks.ObjectType


           
            final Vector oldArgumentNames = new Vector();
            oldArgumentNames.add(getTransformer().getInputArguments());
            oldArgumentNames.add(getTransformer().getOutputArguments());

            ObjectType type = new ObjectType(getTransformer().getClass()){

              @Override
              public void save(Instance rec) {

                String[] oldInputArgNames = (String[]) oldArgumentNames.get(0);
View Full Code Here


    handlerActivityPanel.addMouseListener(new MouseListener(){

      public void mouseClicked(MouseEvent e) {
        ProcessDesigner.getInstance().getPropertyPanel().removeAll();
       
        ObjectType eventHandlerType;
        try {
         
         
          //find out which handler is selected. Either I know this is not that good code ;)
          int handlerIndex = getScopeActivity().getEventHandlers().length - e.getX() / 32;
          EventHandler theEventHandler = getScopeActivity().getEventHandlers()[handlerIndex];
          //
         
          eventHandlerType = new ObjectType(EventHandler.class);
         
          ObjectInstance eventHandlerInstance = (ObjectInstance)eventHandlerType.createInstance();
          eventHandlerInstance.setObject(theEventHandler);
         
          InputForm eventHandlerInputForm = new InputForm(eventHandlerType){
            public void onSaveOK(Instance rec, JDialog dialog){
             
View Full Code Here

     
      ///if validation process is ok
      final Vector emptyIfSuccess = new Vector();
     
      Type saveDialog =
        new ObjectType(SaveDialogInfo.class){
   
        public void save(final Instance rec){ 
          super.save(rec);

          final SaveDialogInfo saveDialogInfo = (SaveDialogInfo)((ObjectInstance)rec).getObject();
         
          try {
            saveDesignToServer(definition, saveDialogInfo);
          } catch (UEngineException e) {
            emptyIfSuccess.add("failed");
          }
         
        }
                 
        public void update(Instance rec){
          save(rec);
        }
      };
     
      System.out.print(getDefinitionId());
      if (UEngineUtil.isNotEmpty(getDefinitionId())) {
        saveDialog.removeFieldDescriptor("Alias");
      }
     
      InputForm inputForm = (new InputForm(saveDialog));
     
      ProcessDefinition def = definition;

      String definitionName = def.getName().getText();
      String alias = def.getAlias();
      int version=def.getVersion();

      SaveDialogInfo defaultSettings = new SaveDialogInfo();
      defaultSettings.setName(definitionName);
      defaultSettings.setAlias(alias);
      defaultSettings.setVersion(version+1);
      defaultSettings.setAuthor(getRevisionInfo());
     
      //ObjectInstance objInstance = saveDi
     
      /*Instance defaultSettings = saveDialog.createInstance();{
        ProcessDefinition def = (ProcessDefinition)getProcessDefinitionDesigner().getActivity();
       
        String definitionName = def.getName().getText();
        String alias = def.getAlias();
        int version=def.getVersion();

        defaultSettings.setFieldValue("Name", definitionName);
        defaultSettings.setFieldValue("Alias", alias);
        defaultSettings.setFieldValue("Version", new Integer(version+1));
        defaultSettings.setFieldValue("Author", getRevisionInfo());
      }*/

      ObjectInstance objInstance = (ObjectInstance)saveDialog.createInstance();
      objInstance.setObject(defaultSettings);
      inputForm.setInstance(objInstance);       
      inputForm.postInputDialog(this, "Confirm", "Confirm", saveDialog.getName());
     
      return emptyIfSuccess.isEmpty();

  }  
View Full Code Here

      ComplexType metaValue = (ComplexType)(variable.getDefaultValue());
      try {

        Class testcls = metaValue.getTypeClass();
       
        ObjectType objType = new ObjectType(testcls);
        FieldDescriptor[] fieldDescriptors = objType.getFieldDescriptors();
        for(int j=0; j<fieldDescriptors.length; j++){
          FieldDescriptor fd = fieldDescriptors[j];
          variableNode.add(createRecord(fd.getName(),variable.getName() + "." + fd.getName(), isSource));
        }
      } catch (Exception e) {
View Full Code Here

TOP

Related Classes of org.metaworks.ObjectType

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.