public void validateDestinationScan(String scannedDestination) { if (StringUtils.isNullOrEmpty(scannedDestination)) { throw new ChippingManagerException(SEED_PLATE_DESTINATION); } // IS THIS A TRAY ? if (scannedDestination.length() != 4 || !StringUtils.isNumeric(scannedDestination)) { throw new ChippingManagerException(scannedDestination + " is not a valid Tray barcode"); } if (isContainedInList(scannedDestination, destinationsList)) { throw new ChippingManagerException(DUPLICATE_DESTINATION_SCANNED); } // CHECK WITH DB THAT TRAY DOES NOT HAVE OTHER NON SORTED PROJECT ASSOCIATIONS if (seedChipperGUIController .getSeedChipperController() .isTrayUsedInOtherProjects(scannedDestination)) { throw new ChippingManagerException(TRAY_IN_MULTIPLE_PROJECTS); } }
public final byte[] serialize() { final byte[] cdata = StringUtils.toUTF8(this.m_criterion); final int presize = cdata.length; final ByteBuffer bb = ByteBuffer.allocate(32 + presize); bb.putInt(this.m_id); bb.put(this.m_order); bb.putInt(this.m_gfx); bb.putInt(cdata.length); bb.put(cdata); bb.put((byte) (this.m_success ? 1 : 0)); bb.putInt(this.m_itemId); bb.putShort(this.m_itemQty); bb.putInt(this.m_xp); bb.putInt(this.m_kama); bb.putInt(this.m_guildPoints); return bb.array(); }
public void addRioxxVersionSection(List upload, Item item) throws WingException { String version = item.getMetadata("rioxxterms.version"); if (StringUtils.isNotBlank(version) && !"NA".equals(version)) { try { DCInputsReader a = new DCInputsReader(); java.util.List<String> pairs = a.getPairs("rioxxterms_version"); int humanReadable = pairs.indexOf(version) - 1; version = pairs.get(humanReadable); } catch (DCInputsReaderException e) { log.error(e.getMessage(), e); } upload .addItem("upload-rioxx-version-warning", "upload-rioxx-version-warning") .addContent(T_rioxx_version.parameterize(version)); } }
public CIJob getJob(ApplicationInfo appInfo, String jobName) throws PhrescoException { try { S_LOGGER.debug("Search for jobName => " + jobName); if (StringUtils.isEmpty(jobName)) { return null; } List<CIJob> jobs = getJobs(appInfo); if (CollectionUtils.isEmpty(jobs)) { S_LOGGER.debug("job list is empty!!!!!!!!"); return null; } S_LOGGER.debug("Job list found!!!!!"); for (CIJob job : jobs) { S_LOGGER.debug("job list job Names => " + job.getName()); if (job.getName().equals(jobName)) { return job; } } } catch (Exception e) { throw new PhrescoException(e); } return null; }
private void customizeNodes(ConfigProcessor processor, CIJob job) throws JDOMException, PhrescoException { // SVN url customization if (SVN.equals(job.getRepoType())) { S_LOGGER.debug("This is svn type project!!!!!"); processor.changeNodeValue(SCM_LOCATIONS_REMOTE, job.getSvnUrl()); } else if (GIT.equals(job.getRepoType())) { S_LOGGER.debug("This is git type project!!!!!"); processor.changeNodeValue(SCM_USER_REMOTE_CONFIGS_URL, job.getSvnUrl()); processor.changeNodeValue(SCM_BRANCHES_NAME, job.getBranch()); // cloned workspace } else if (CLONED_WORKSPACE.equals(job.getRepoType())) { S_LOGGER.debug("Clonned workspace selected!!!!!!!!!!"); processor.useClonedScm(job.getUsedClonnedWorkspace(), SUCCESSFUL); } // Schedule expression customization processor.changeNodeValue(TRIGGERS_SPEC, job.getScheduleExpression()); // Triggers Implementation List<String> triggers = job.getTriggers(); processor.createTriggers(TRIGGERS, triggers, job.getScheduleExpression()); // if the technology is java stanalone and functional test , goal have to specified in post // build step only if (job.isEnablePostBuildStep() && FUNCTIONAL_TEST.equals(job.getOperation())) { // Maven command customization processor.changeNodeValue(GOALS, CI_FUNCTIONAL_ADAPT.trim()); } else { // Maven command customization processor.changeNodeValue(GOALS, job.getMvnCommand()); } // Recipients customization Map<String, String> email = job.getEmail(); // Failure Reception list processor.changeNodeValue( TRIGGER_FAILURE_EMAIL_RECIPIENT_LIST, (String) email.get(FAILURE_EMAILS)); // Success Reception list processor.changeNodeValue( TRIGGER_SUCCESS__EMAIL_RECIPIENT_LIST, (String) email.get(SUCCESS_EMAILS)); // enable collabnet file release plugin integration if (job.isEnableBuildRelease()) { S_LOGGER.debug("Enablebling collabnet file release plugin "); processor.enableCollabNetBuildReleasePlugin(job); } // use clonned scm if (CLONED_WORKSPACE.equals(job.getRepoType())) { S_LOGGER.debug("using cloned workspace "); processor.useClonedScm(job.getUsedClonnedWorkspace(), SUCCESSFUL); } // clone workspace for future use if (job.isCloneWorkspace()) { S_LOGGER.debug("Clonning the workspace "); processor.cloneWorkspace(ALL_FILES, SUCCESSFUL, TAR); } // Build Other projects if (StringUtils.isNotEmpty(job.getDownStreamProject())) { S_LOGGER.debug("Enabling downstream project!!!!!!"); processor.buildOtherProjects(job.getDownStreamProject()); } // pom location specifier if (StringUtils.isNotEmpty(job.getPomLocation())) { S_LOGGER.debug("POM location changing " + job.getPomLocation()); processor.updatePOMLocation(job.getPomLocation()); } if (job.isEnablePostBuildStep()) { System.out.println("java stanalone technology with functional test enabled!!!!!!!"); String mvnCommand = job.getMvnCommand(); String[] ciAdapted = mvnCommand.split(CI_FUNCTIONAL_ADAPT); // java stanalone functional test alone for (String ciCommand : ciAdapted) { S_LOGGER.debug("ciCommand...." + ciCommand); } // iterate over loop processor.enablePostBuildStep(job.getPomLocation(), ciAdapted[1]); } if (job.isEnablePreBuildStep()) { System.out.println("java stanalone technology with functional test enabled!!!!!!!"); // iterate over loop List<String> prebuildStepCommands = job.getPrebuildStepCommands(); for (String prebuildStepCommand : prebuildStepCommands) { processor.enablePreBuildStep(job.getPomLocation(), prebuildStepCommand); } } }