@Nonnull
 public static <T extends IHasID<String> & IHasDisplayName> HCA createDeleteLink(
     @Nonnull final ILayoutExecutionContext aLEC, @Nonnull final T aCurObject) {
   return createDeleteLink(
       aLEC,
       aCurObject,
       EWebPageText.OBJECT_DELETE.getDisplayTextWithArgs(
           aLEC.getDisplayLocale(), aCurObject.getDisplayName()));
 }
 @Nonnull
 public static <T extends IHasID<String> & IHasDisplayName> HCA createEditLink(
     @Nonnull final ILayoutExecutionContext aLEC,
     @Nonnull final T aCurObject,
     @Nullable final Map<String, String> aParams) {
   return createEditLink(
       aLEC,
       aCurObject,
       EWebPageText.OBJECT_EDIT.getDisplayTextWithArgs(
           aLEC.getDisplayLocale(), aCurObject.getDisplayName()),
       aParams);
 }
 /**
  * Changes the identifier for a given object, as stored in this AbstractReferenceManufacturer.
  *
  * @param key The new identifier to be used for the given object
  * @param item The object for which the identifier in this AbstractReferenceManufacturer should be
  *     changed
  */
 @Override
 public void renameObject(String key, T item) {
   String oldKey = item.getKeyName();
   if (oldKey.equalsIgnoreCase(key)) {
     if (Logging.isDebugMode()) {
       Logging.debugPrint(
           "Worthless Key change encountered: " + item.getDisplayName() + " " + oldKey);
       Logging.reportSource(Logging.DEBUG, item.getSourceURI());
     }
   }
   forgetObject(item);
   addObject(item, key);
 }
 private boolean validateActive() {
   boolean returnGood = true;
   for (Object second : active.keySet()) {
     T activeObj = active.get(second);
     String keyName = activeObj.getKeyName();
     if (keyName == null) {
       Logging.errorPrint(
           activeObj.getClass() + " " + activeObj.getDisplayName() + " has a null KeyName");
     } else if (!keyName.equalsIgnoreCase(second.toString())) {
       Logging.errorPrint(
           getReferenceDescription() + " Magical Key Change: " + second + " to " + keyName);
       returnGood = false;
     }
   }
   return returnGood;
 }
 @Override
 @GuardedBy("hudson.model.Queue.lock")
 public long check(T c) {
   if (!c.isConnecting() && c.isAcceptingTasks()) {
     if (isIdleForTooLong(c)) {
       try {
         Node n = c.getNode();
         if (n
             != null) // rare, but n==null if the node is deleted and being checked roughly at the
           // same time
           kill(n);
       } catch (IOException e) {
         LOGGER.log(Level.WARNING, "Failed to remove " + c.getDisplayName(), e);
       }
     }
   }
   return checkCycle();
 }
Example #6
0
 protected void renderName(T entity, double x, double y, double z) {
   if (this.canRenderName(entity)) {
     this.renderLivingLabel(entity, entity.getDisplayName().getFormattedText(), x, y, z, 64);
   }
 }