Package gov.nasa.arc.mct.components

Examples of gov.nasa.arc.mct.components.AbstractComponent.save()


          component = comp.newInstance(ExecutableButtonComponent.class, targetComponent);
         
          ExecutableButtonModel execButtonModel = ExecutableButtonComponent.class.cast(component).getModel();
          execButtonModel.getData().setExecCmd(execCmd);
          component.setDisplayName(displayName);
      component.save();
         
          return component;
    }

    private void setupTextField(String defaultValue, final JTextField field, final JButton create) {
View Full Code Here


                AbstractComponent duplicate = selectedComponent.clone();
                ComponentInitializer ci = duplicate.getCapability(ComponentInitializer.class);
                ci.setCreator(GlobalContext.getGlobalContext().getUser().getUserId());
                ci.setOwner(GlobalContext.getGlobalContext().getUser().getUserId());
                duplicate.setDisplayName(name);
                duplicate.save();
                parentComponent.addDelegateComponent(duplicate);
                parentComponent.save();
            }

        }
View Full Code Here

            AbstractComponent duplicate = component.clone();
            ComponentInitializer ci = duplicate.getCapability(ComponentInitializer.class);
            ci.setCreator(PlatformAccess.getPlatform().getCurrentUser().getUserId());
            ci.setOwner(PlatformAccess.getPlatform().getCurrentUser().getUserId());
            duplicate.setDisplayName("copy of " + component.getDisplayName());
            duplicate.save();
            return duplicate;
        }
    }
}
View Full Code Here

        collectionComponent.save();
        if (!addComponents(components, collectionComponent)) {
            mySandbox.removeDelegateComponent(collectionComponent);
            collectionComponent = null;
        }
        mySandbox.save();
        return collectionComponent;
    }
   
    @Override
    public <T extends AbstractComponent> T newInstance(Class<T> componentClass, AbstractComponent parent) {
View Full Code Here

            ComponentInitializer ci = newComponent.getCapability(ComponentInitializer.class);
            ci.setCreator(getDefaultUser());
           
            parent.addDelegateComponent(newComponent)
            parent.save();
            newComponent.save();
        }
       
        return componentClass.cast(newComponent);
    }
   
View Full Code Here

                PersistenceProvider persistenceProvider = PlatformAccess.getPlatform().getPersistenceProvider();
                boolean successfulAction = false;
                try {
                    persistenceProvider.startRelatedOperations();
                    targetComponent.addDelegateComponents(sourceComponents);
                    targetComponent.save();
                    successfulAction = true;
                } finally {
                    persistenceProvider.completeRelatedOperations(successfulAction);
                }
View Full Code Here

            /*
             * Note that save() tells MCT that the user wishes to persist the data into the database.  Thus, when the user
             * clicks save, and then switches away from this view (like by choosing the info-view) MCT will prompt the user
             * if they wish to save the data.
             */
            component.save()
          }
        });
      
        //remember: MCT class 'View' extends a JPanel
        add(jp);
View Full Code Here

               
        component = comp.newInstance(componentClass, targetComponent);
    ((EvaluatorComponent)component).getData().setLanguage(language.getSelectedItem().toString());
    ((EvaluatorComponent)component).getData().setCode("");
    component.setDisplayName(displayName);
    component.save();
       
        return component;
  }

  @Override
View Full Code Here

    ((MultiComponent)component).getData().setLanguage(language.getSelectedItem().toString());
    ((MultiComponent)component).getData().setCode("");
    ((MultiComponent)component).getData().setFallThroughDisplayValue("????");
    ((MultiComponent)component).getData().setPassThrough(false);
    component.setDisplayName(displayName);
    component.save();
       
        return component;
  }

  @Override
View Full Code Here

          LimitLineModel limitLineModel = LimitLineComponent.class.cast(component).getModel();
          limitLineModel.setValue(limitLineText);
          component.setDisplayName(displayNameText);
          component.setExternalKey(component.getComponentId());
          component.setDisplayName(displayNameText);
      component.save();
         
          return component;
    }

    private void setupTextField(String defaultValue, final JTextField field, final JButton createButton) {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.