Writes the current link into the pointer resource. <p>

@see org.opencms.workplace.galleries.CmsAjaxLinkGallery#changeItemLinkUrl(String)

@param itemUrl the pointer resource to change the link of
175564
@Override
    protected void changeItemLinkUrl(String itemUrl) {

        try {
            JspWriter out = getJsp().getJspContext().getOut();
            if (getCms().existsResource(itemUrl)) {
                try {
                    writePointerLink(getCms().readResource(itemUrl));
                    out.print(buildJsonItemObject(getCms().readResource(itemUrl)));
                } catch (CmsException e) {
                    // can not happen in theory, because we used existsResource() before...
                }
            } else {
                out.print(RETURNVALUE_NONE);
            }
        } catch (IOException e) {
            if (LOG.isErrorEnabled()) {
                LOG.error(e.getLocalizedMessage(), e);
            }
        }

    }
785285
public void addItemDetails(CmsListItemDetails itemDetail) {

        itemDetail.setListId(getListId());
        m_itemDetails.addIdentifiableObject(itemDetail.getId(), itemDetail);
    }
338301
public void fillItem(I_CmsDataViewItem item, Item target) {

        for (CmsDataViewColumn column : m_dataView.getColumns()) {
            String name = column.getId();
            Object value = CmsColumnValueConverter.getColumnValue(item.getColumnData(name), column.getType());
            target.getItemProperty(name).setValue(value);
        }
        target.getItemProperty(CmsDataViewPanel.ID_COLUMN).setValue(item.getId());
    }
1215649
protected void setSelectedIconUrl(String iconUrl) {
		this.selectedIconUrl = iconUrl != null ? iconUrl : defaultIconUrl;
		emphasizeSelectedIconInChoiceList(selectedIconUrl);
		updatePreview();
	}
488427
void onItemClick(MouseEvents.ClickEvent event, Object itemId, Object propertyId) {

        if (!event.isCtrlKey() && !event.isShiftKey()) {

            changeValueIfNotMultiSelect(itemId);

            // don't interfere with multi-selection using control key
            if (event.getButton().equals(MouseButton.RIGHT) || (TableProperty.Icon.equals(propertyId))) {

                m_menu.setEntries(getMenuEntries(), (Set<String>)getValue());
                m_menu.openForTable(event, itemId, propertyId, this);
            } else if (event.getButton().equals(MouseButton.LEFT) && TableProperty.UserName.equals(propertyId)) {
                showUserInfoWindow(((Set<String>)getValue()).iterator().next());
            }
        }
    }
1353933
protected void handleItemClick(Object itemId) {

        Item item = getItem(itemId);
        I_CmsOuTreeType type = (I_CmsOuTreeType)getItem(itemId).getItemProperty(PROP_TYPE).getValue();
        CmsUUID roleOrGroupID = null;
        boolean idInItem = false;
        if (itemId instanceof CmsUUID) {
            roleOrGroupID = (CmsUUID)itemId;
            idInItem = true;
        } else if (item.getItemProperty(PROP_SID).getValue() != null) {
            roleOrGroupID = (CmsUUID)(item.getItemProperty(PROP_SID).getValue());
            idInItem = true;
        }
        if (type.equals(CmsOuTreeType.ROLE)) {
            String ou = getOuFromItem(itemId, CmsOuTreeType.ROLE);
            boolean isRoot = ou.isEmpty();
            if (isRoot) {
                ou = "/";
            }
            if (!((String)itemId).endsWith(ou)) {
                if (isRoot) {
                    if (((String)itemId).length() > (ou.length() + 1)) {
                        roleOrGroupID = new CmsUUID(((String)itemId).substring(ou.length() + 1));
                    }
                } else {
                    roleOrGroupID = new CmsUUID(((String)itemId).substring(ou.length() + 2));
                }
            }
        }

        m_app.update(getOuFromItem(itemId, type), type, roleOrGroupID, "");
        if (isExpanded(itemId) || idInItem) {
            return;
        }
        loadAndExpand(itemId, type);
        setValue(itemId);

    }
281125
protected ItemData putItem(ItemData item)
   {
      if (item.isNode())
      {
         return putNode((NodeData)item, ModifyChildOption.MODIFY);
      }
      else
      {
         return putProperty((PropertyData)item, ModifyChildOption.MODIFY);
      }
   }
507841
public void setHref(String url) {
        if (url == null)
            throw new RuntimeException("Cannot set URL to null. Call removeUrl() if you wanted to remove the URL");
        if (anchor == null) {
            if (controlGroupRoot != null) {
                //!!! following code is semi-working, it's not reconstructed item correctly
                remove(controlGroupRoot);
                anchor = Document.get().createAnchorElement();
                anchor.setAttribute("href", url);
                moveThisChildrenToAnchor();
                cleanUpLI();
                prepareAnchorForControlGroup();
                getElement().appendChild(anchor);
                checkAnchorPanel();
            } else {
                // need to make anchor and move children to it
                anchor = Document.get().createAnchorElement();
                moveThisChildrenToAnchor();
                getElement().appendChild(anchor);
            }
            addItemActivationHandlers();
        }
        anchor.setAttribute("href", url);
    }
632808
public void setMQLinkStateItemStream(ItemStream mqLinkStateItemStream) 
    throws SIException                                      
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) 
      SibTr.entry(tc, "setMQLinkStateItemStream", 
        new Object[]{mqLinkStateItemStream});
      // Test that itemstream has not already been set
      
      if(_mqLinkStateItemStream != null)
      {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) 
          SibTr.exit(tc, "setMQLinkStateItemStream", "SIIncorrectCallException");
          
        throw new SIIncorrectCallException(
          nls.getFormattedMessage(
            "MQLINK_STATE_ITEMSTREAM_ALREADY_EXISTS",
            null,
            null));
      }      
            
      // Now set the itemstream
      _mqLinkStateItemStream = mqLinkStateItemStream;
     
      // First, create a local transaction
      ExternalAutoCommitTransaction transaction = 
        messageProcessor.getTXManager().createAutoCommitTransaction();
          
      try
      {
        // Try to set the mqlink itemstream.             
        addItemStream(mqLinkStateItemStream, transaction);
        
        // Get the itemstreams id - we'll use this in reconstitution
        _mqLinkStateItemStreamId = mqLinkStateItemStream.getID();
        
        // Prod the MQLinkHandler to persist this id
        requestUpdate(transaction);
      }
      catch (OutOfCacheSpace e)
      {
        // No FFDC code needed
        SibTr.exception(tc, e);
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) 
          SibTr.exit(tc, "setMQLinkStateItemStream", "SIResourceException");
        throw new SIResourceException(e);
      }
      catch (MessageStoreException e)
      {
        // FFDC
        FFDCFilter.processException(
          e,
          "com.ibm.ws.sib.processor.impl.MQLinkHandler.setMQLinkStateItemStream",
          "1:5452:1.341",
          this);
      
        // Map to a core exception  
        SIResourceException eCore =
            new SIResourceException(
              nls.getFormattedMessage(
                "MQLINK_STATE_ITEMSTREAM_MESSAGE_STORE_ERROR",
                null,
                null));   
                
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) 
          SibTr.exit(tc, "setMQLinkStateItemStream", eCore);
           
        throw eCore;  
      }          

      if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
        SibTr.exit(tc, "setMQLinkStateItemStream");        
      
  }
236136
public void replaceItem(@NonNull final T oldObject, @NonNull final T newObject) {
        synchronized (mLock) {
            final int position = getPosition(oldObject);
            if (position == -1) {
                // not found, don't replace
                return;
            }

            mObjects.remove(position);
            mObjects.add(position, newObject);

            if (isItemTheSame(oldObject, newObject)) {
                if (isContentTheSame(oldObject, newObject)) {
                    // visible content hasn't changed, don't notify
                    return;
                }

                // item with same stable id has changed
                notifyItemChanged(position, newObject);
            } else {
                // item replaced with another one with a different id
                notifyItemRemoved(position);
                notifyItemInserted(position);
            }
        }
    }
645104
public String getItemImageUrl(final TreeItemImage item, final String itemId) {

		if (item == null) {
			return null;
		}

		// Check if has image url
		String url = item.getUrl();
		if (!Util.empty(url)) {
			return url;
		}

		// Check if has image
		Image image = item.getImage();
		if (image == null) {
			return null;
		}

		// Check static resource
		if (image instanceof InternalResource) {
			return ((InternalResource) image).getTargetUrl();
		}

		// Build targetted url
		Environment env = getEnvironment();
		Map<String, String> parameters = env.getHiddenParameters();
		parameters.put(Environment.TARGET_ID, getTargetId());

		String cacheKey = item.getImageCacheKey();

		if (Util.empty(cacheKey)) {
			// Add some randomness to the URL to prevent caching
			String random = WebUtilities.generateRandom();
			parameters.put(Environment.UNIQUE_RANDOM_PARAM, random);
		} else {
			// Remove step counter as not required for cached content
			parameters.remove(Environment.STEP_VARIABLE);
			parameters.remove(Environment.SESSION_TOKEN_VARIABLE);
			// Add the cache key
			parameters.put(Environment.CONTENT_CACHE_KEY, cacheKey);
		}

		// Item id
		parameters.put(ITEM_REQUEST_KEY, itemId);

		// The targetable path needs to be configured for the portal environment.
		url = env.getWServletPath();

		// Note the last parameter. In javascript we don't want to encode "&".
		return WebUtilities.getPath(url, parameters, true);
	}
95579
private void writePointerLink(CmsResource res) throws CmsException {

        String resPath = getCms().getSitePath(res);
        String currentPropertyValue = getParamPropertyValue();
        boolean locked = true;
        CmsLock lock = getCms().getLock(res);
        if (lock.isUnlocked()) {
            // lock resource before operation
            getCms().lockResource(resPath);
            locked = false;
        }
        CmsFile file = getCms().readFile(res);
        file.setContents(currentPropertyValue.getBytes());
        checkLock(getCms().getSitePath(res));
        getCms().writeFile(file);
        if (!locked) {
            // unlock the resource
            getCms().unlockResource(resPath);
        }
    }
144211
public void setItems(java.util.Collection<VpcLink> items) {
        if (items == null) {
            this.items = null;
            return;
        }

        this.items = new java.util.ArrayList<VpcLink>(items);
    }
1195940
@Override
	public Link linkToItemResource(Class<?> entity, Object id) {
		return linkFor(entity).slash(id).withSelfRel();
	}
1128741
public void setItem(java.util.Collection<EndpointResponse> item) {
        if (item == null) {
            this.item = null;
            return;
        }

        this.item = new java.util.ArrayList<EndpointResponse>(item);
    }
609990
public void setItem(java.util.Collection<SegmentResponse> item) {
        if (item == null) {
            this.item = null;
            return;
        }

        this.item = new java.util.ArrayList<SegmentResponse>(item);
    }
1322586
public synchronized void addItem(T item) {
        synchronized (items) {
            items.add(item);
        }
//        clusterMarker.setMarkerBitmap();
        if (center == null) {
            center = item.getLatLong();
        } else {
            // computing the centroid
            double lat = 0, lon = 0;
            int n = 0;
            synchronized (items) {
                for (T object : items) {
                    if (object == null) {
                        throw new NullPointerException("object == null");
                    }
                    if (object.getLatLong() == null) {
                        throw new NullPointerException("object.getLatLong() == null");
                    }
                    lat += object.getLatLong().latitude;
                    lon += object.getLatLong().longitude;
                    n++;
                }
            }
            center = new LatLong(lat / n, lon / n);
        }
    }