Examples of Sources


Examples of org.glite.lb.Sources

        if (job.getSequenceCode() == null) {
            ctx.setSeqCode(new SeqCode(SeqCode.CREAM, "no_seqcodes_with_cream_insertcmd_" + cmd.getId() + "_" + phase));
        } else {
            SeqCode sc = new SeqCode(SeqCode.CREAMWMS, job.getSequenceCode());
            sc.incrementSeqCode(new Sources(Sources.CREAM_EXECUTOR));

            job.setSequenceCode(sc.toString());

            ctx.setSeqCode(sc);

            if (jobDB != null && !JobCommandConstant.JOB_PURGE.equals(cmd.getName())) {
                try {
                   jobDB.update(job);
                } catch (DatabaseException ex) {
                    throw new LBException(ex.getMessage());
                }
            }
        }

        ctx.setSource(new Sources(Sources.CREAM_INTERFACE));
        ctx.setUser(cmd.getUserId());

        Jobid jobid;
        if (job.getGridJobId() == null || Job.NOT_AVAILABLE_VALUE.equals(job.getGridJobId())) {
            jobid = new Jobid(defaultLBURI.getHost(), defaultLBURI.getPort(), job.getId());
View Full Code Here

Examples of org.glite.lb.Sources

        if (job.getSequenceCode() == null) {
            ctx.setSeqCode(new SeqCode(SeqCode.CREAM, "no_seqcodes_with_cream_execute_" + cmd.getId() + "_" + phase));
        } else {
            SeqCode sc = new SeqCode(SeqCode.CREAMWMS, job.getSequenceCode());
            sc.incrementSeqCode(new Sources(Sources.CREAM_EXECUTOR));
            job.setSequenceCode(sc.toString());
            ctx.setSeqCode(sc);

            if (jobDB != null && !JobCommandConstant.JOB_PURGE.equals(cmd.getName())) {
                try {
                   jobDB.update(job);
                } catch (DatabaseException ex) {
                    throw new LBException(ex.getMessage());
                }
            }
        }

        ctx.setSource(new Sources(Sources.CREAM_EXECUTOR));
        ctx.setUser(cmd.getUserId());

        Jobid jobid;
        if (job.getGridJobId() == null || Job.NOT_AVAILABLE_VALUE.equals(job.getGridJobId())) {
            jobid = new Jobid(defaultLBURI.getHost(), defaultLBURI.getPort(), job.getId());
        } else {
            jobid = new Jobid(job.getGridJobId());
        }

        ctx.setJobid(jobid);

        EventCREAMCall event = new EventCREAMCall();
        event.setCallee(new Sources(Sources.LRMS));
        event.setCmdid(""+cmd.getId());
       
        // logger.debug("execute: id = " + cmd.getId() + " name = " +
        // cmd.getName()+ " category = " + cmd.getCategory() +
        // " failureReason = " + cmd.getFailureReason() + " description = " +
View Full Code Here

Examples of org.glite.lb.Sources

       
        if (job.getSequenceCode() == null) {
            ctx.setSeqCode(new SeqCode(SeqCode.CREAM, "no_seqcodes_with_cream_statuschange_" + status.getName() + "_" + phase));
        } else {
            SeqCode sc = new SeqCode(SeqCode.CREAMWMS, job.getSequenceCode());
            sc.incrementSeqCode(new Sources(Sources.CREAM_EXECUTOR));
            job.setSequenceCode(sc.toString());
            ctx.setSeqCode(sc);

            if (jobDB != null) {
                try {
                   jobDB.update(job);
                } catch (DatabaseException ex) {
                    throw new LBException(ex.getMessage());
                }
            }
        }
       
        ctx.setSource(new Sources(Sources.CREAM_EXECUTOR));
        ctx.setUser(job.getUserId());

        Jobid jobid;
        if (job.getGridJobId() == null || Job.NOT_AVAILABLE_VALUE.equals(job.getGridJobId())) {
            jobid = new Jobid(defaultLBURI.getHost(), defaultLBURI.getPort(), job.getId());
View Full Code Here

Examples of org.glite.lb.Sources

        ContextIL ctx = new ContextIL(ILPrefix);
        if (job.getSequenceCode() == null) {
            ctx.setSeqCode(new SeqCode(SeqCode.CREAM, "no_seqcodes_with_cream_accept"));
        } else {
            SeqCode sc = new SeqCode(SeqCode.CREAMWMS, job.getSequenceCode());
            sc.incrementSeqCode(new Sources(Sources.CREAM_EXECUTOR));
           
            job.setSequenceCode(sc.toString());
           
            ctx.setSeqCode(sc);

            if (jobDB != null) {
                try {
                   jobDB.update(job);
                } catch (DatabaseException ex) {
                    throw new LBException(ex.getMessage());
                }
            }
        }
       
        ctx.setSource(new Sources(Sources.CREAM_EXECUTOR));
        ctx.setUser(job.getUserId());

        Jobid jobid;
        if (job.getGridJobId() == null || Job.NOT_AVAILABLE_VALUE.equals(job.getGridJobId())) {
            jobid = new Jobid(defaultLBURI.getHost(), defaultLBURI.getPort(), job.getId());
View Full Code Here

Examples of org.netbeans.api.project.Sources

                else if (this.relatedEditMediator != null && this.relatedEditMediator.ownedFolders.contains(normalizedFile)) {
                    rootsFromRelatedSourceRoots.add (normalizedFile);
                    continue;
                }
                if ((p=FileOwnerQuery.getOwner(normalizedFile.toURI()))!=null && !p.getProjectDirectory().equals(project.getProjectDirectory())) {
                    final Sources sources = (Sources) p.getLookup().lookup (Sources.class);
                    if (sources == null) {
                        rootsFromOtherProjects.add (normalizedFile);
                        continue;
                    }
                    final SourceGroup[] sourceGroups = sources.getSourceGroups(Sources.TYPE_GENERIC);
                    final SourceGroup[] javaGroups = sources.getSourceGroups(JavaProjectConstants.SOURCES_TYPE_JAVA);
                    final SourceGroup[] groups = new SourceGroup [sourceGroups.length + javaGroups.length];
                    System.arraycopy(sourceGroups,0,groups,0,sourceGroups.length);
                    System.arraycopy(javaGroups,0,groups,sourceGroups.length,javaGroups.length);
                    final FileObject projectDirectory = p.getProjectDirectory();
                    final FileObject fileObject = FileUtil.toFileObject(normalizedFile);
View Full Code Here

Examples of org.netbeans.api.project.Sources

        Project[] open = OpenProjects.getDefault().getOpenProjects();
        return ArrayUtils.isEmpty(open) ? CollectionUtils.EMPTY_COLLECTION : Arrays.asList(open);
    }

    public static ClassPath getSourceClassPath(final Project project) {
        Sources sources = org.netbeans.api.project.ProjectUtils.getSources(project);
        SourceGroup srcGroup = sources.getSourceGroups(JavaProjectConstants.SOURCES_TYPE_JAVA)[0];
        return ClassPath.getClassPath(srcGroup.getRootFolder(), ClassPath.SOURCE);
    }
View Full Code Here

Examples of org.netbeans.api.project.Sources

        SourceGroup srcGroup = sources.getSourceGroups(JavaProjectConstants.SOURCES_TYPE_JAVA)[0];
        return ClassPath.getClassPath(srcGroup.getRootFolder(), ClassPath.SOURCE);
    }

    public static ClasspathInfo getSourceClassPathInfo(final Project project) {
        Sources sources = org.netbeans.api.project.ProjectUtils.getSources(project);
        SourceGroup srcGroup = sources.getSourceGroups(JavaProjectConstants.SOURCES_TYPE_JAVA)[0];
        return ClasspathInfo.create(srcGroup.getRootFolder());
    }
View Full Code Here

Examples of org.netbeans.api.project.Sources

        return PackageUtils.getPackages(getSourceClassPath(project), includeRootPackage);
    }

    public static Collection<FileObject> getProjectFiles(final Project project, final FileType... types) {
        Collection<FileObject> fileObjects = new ArrayList<FileObject>();
        Sources srcs = org.netbeans.api.project.ProjectUtils.getSources(project);
        SourceGroup[] srcGrps = srcs.getSourceGroups(Sources.TYPE_GENERIC);
        for (SourceGroup srcGrp : srcGrps) {
            fileObjects.addAll(FileObjectUtils.getFiles(srcGrp.getRootFolder(), true, types));
        }
        return fileObjects;
    }
View Full Code Here

Examples of org.netbeans.api.project.Sources

            /* It's a relative file path*/
            file = new File(projectOwner.getProjectDirectory().getPath(), path);
        }else{
            /* It's an element name. Assume is a java file */
            String filePath=path.replace(".", "/")+DEFAULT_EXTENSION;
            Sources sources = ProjectUtils.getSources(projectOwner);
            SourceGroup[] sourceGroups = sources.getSourceGroups(JavaProjectConstants.SOURCES_TYPE_JAVA);
            file = new File(sourceGroups[0].getRootFolder().getPath(), filePath);
        }
        return file;
    }
View Full Code Here

Examples of org.netbeans.api.project.Sources

    /**
     * @param project
     * @return True if the project contains sources.
     */
    private boolean configureSourcesAndBinariesProperties(String module, Project project) {
        Sources sources = ProjectUtils.getSources(project);
        SourceGroup[] sourceGroups = sources.getSourceGroups(JavaProjectConstants.SOURCES_TYPE_JAVA);
        if (sourceGroups != null && sourceGroups.length != 0) {
            String sourceProperty = "sonar.sources";
            if (module != null) {
                sourceProperty = module + "." + sourceProperty;
            }
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.