Aller au contenu principal

I need your help to get a script for First Sprit Internet Project from which i can get all the packages of the project for which we excute the script.and all objects contains by each package

Commentaires

4 commentaires

  • Zendesk API User
    Author: pavone - 3/7/2014 10:59

    Hello,

    here is a script that should help you getting started (not fully tested):

    import de.espirit.firstspirit.access.packagepool.PackageManager;

    import de.espirit.firstspirit.access.packagepool.Package;

    import de.espirit.firstspirit.access.Connection;

    import de.espirit.firstspirit.access.project.Project;

    import de.espirit.firstspirit.access.store.IDProvider;

    Connection connection = context.getConnection();

    Project currentProject = connection.getProjectByName("<PROJECT_NAME>"); // Insert your project name

    PackageManager packageManager = (PackageManager) connection.getService(PackageManager.SERVICE_NAME);

    // Get packages

    packages = packageManager.getPackages(currentProject);

    for (Package p : packages) {

      // Get elements in package

      startNodes = p.getStartNodes();

      // Do whatever you want with the packages and the elements

    }

    Please note that you have to replace <PROJECT_NAME> with the name of your project.

    This script is only meant to show you how to access the packages and the elements inside the packages. How you use them of course depends on your use cae.

    I hope this will help you.

    Best regards

    Tim

    0
  • Zendesk API User
    Author: MichaelaReydt - 3/18/2014 10:00

    Hello,

    do you need further help or did Tims reply already help you? If so it would be great, if you mark his answer as "correct answer". If you have already found a solution by yourself, it would by kind of you, if you posted it here.

    Best regards

    Michaela

    0
  • Zendesk API User
    Author: saurabh - 4/2/2014 12:46

    Thanks for support

    0
  • Zendesk API User
    Author: saurabh - 4/2/2014 14:23

    Hi,

    This script is sufficient thanks for support.

    0

Vous devez vous connecter pour laisser un commentaire.