编辑标签
@param tagId 标签ID
@param newTagName 新的标签名称
@return 编辑结果
762422
public ResultType updateTag(Integer tagId, String newTagName) {
        BeanUtil.requireNonNull(tagId, "tagId is null");
        BeanUtil.requireNonNull(newTagName, "newTagName is null");
        LOG.debug("编辑标签.....");
        String url = BASE_API_URL + "cgi-bin/tags/update?access_token=#";
        Map<String, Object> param = new HashMap<String, Object>();
        param.put("id", tagId);
        param.put("name", newTagName);
        BaseResponse response = executePost(url, JSONUtil.toJson(param));
        return ResultType.get(response.getErrcode());
    }
370956
public void setTagId(String tagId)
    {
        ExtendedInfo info = getInfo(tagId);
        if (info != null)
            info._tagId = tagId;
    }
315729
protected String getId(FaceletContext ctx)
    {
        if (this.id != null)
        {
            return this.id.getValue(ctx);
        }
        return ctx.generateUniqueId(this.tagId);
    }
801947
public static UserTagGetResult userTagGet(String access_token,Integer tagid,String next_openid){
		String json = String.format("{\"tagid\":%d,\"next_openid\":\"%s\"}",tagid,next_openid==null?"":next_openid);
		HttpUriRequest httpUriRequest = RequestBuilder.post()
										.setHeader(jsonHeader)
										.setUri(BASE_URI+"/cgi-bin/user/tag/get")
										.addParameter(PARAM_ACCESS_TOKEN, API.accessToken(access_token))
										.setEntity(new StringEntity(json,Charset.forName("utf-8")))
										.build();
		return LocalHttpClient.executeJsonResult(httpUriRequest,UserTagGetResult.class);
	}
464875
@Override
	public void doTag() throws JspException, IOException {
		try {
			JspContext  context     = getJspContext();
			JspFragment fragment    = getJspBody();
            PageContext pageContext = (PageContext) context;
			
            // invoke before event
			beforeDoTag(context, fragment);

            // 내장객체 추가
            innerInstance.put("param",   TagUtils.getRequestParameterMap(pageContext));
            innerInstance.put("request", TagUtils.getRequestAttributeMap(pageContext));
            innerInstance.put("session", TagUtils.getSessionAttributeMap(pageContext));
            innerInstance.put("cookie",  TagUtils.getCookieMap(pageContext));
            innerInstance.putAll(dynamicAttrMap);

            Object[]  params      = new Object[] { this, innerInstance };
            String    mustacheKey = getClass().getCanonicalName();
            AXUConfig config      = ConfigReader.getConfig();

            if (this instanceof CustomTag) {
                CustomTag customTag = (CustomTag) this;
                mustacheKey = mustacheKey + "#" + customTag.getCustomid();
            }

            mustacheHtml = mustacheCacheMap.get(mustacheKey);
            if (mustacheHtml == null) {
				if (tagBody == null) {
					throw new RuntimeException("tag body is empty. please check your aux4j.xml");
				}

                mustacheHtml = mustacheFactory.compile(new StringReader(tagBody), mustacheKey);

                if (!StringUtils.equalsIgnoreCase("DEV", config.getMode())) {
                    mustacheCacheMap.put(mustacheKey, mustacheHtml);
                }
            }
            mustacheHtml.execute(context.getOut(), params);

            // invoke after event
			afterDoTag(context, fragment);
			
		} catch (Exception e) {
			logger.error(String.format("doTag is fail.\ntagBody: %s\nmustacheHtml: %s", tagBody, (mustacheHtml == null ? "null" : mustacheHtml.toString())), e);
		}

	}
1110381
private void pushTag(String qName) {
		final String currentTag = getCurrentTag();
		if ("".equals(currentTag)) {
			mTagStack.push(qName);
		} else {
			mTagStack.push(getCurrentTag() + "." + qName);
		}
	}
135373
public String getTagsetId() {
    if (POSTag_Type.featOkTst && ((POSTag_Type)jcasType).casFeat_tagsetId == null)
      jcasType.jcas.throwFeatMissing("tagsetId", "de.julielab.jules.types.POSTag");
    return jcasType.ll_cas.ll_getStringValue(addr, ((POSTag_Type)jcasType).casFeatCode_tagsetId);}
339468
public static String getTagValue(Id id, String k) {
    Preconditions.checkNotNull(id, "id");
    return getTagValue(id.tags(), k);
  }
268758
public boolean addPreserveTag(final String tagName) {

        Vector<Attribute> attributeList = new Vector<Attribute>(1);
        Attribute tagNameAttribute = new Attribute();
        tagNameAttribute.setName(tagName.toLowerCase());
        attributeList.add(tagNameAttribute);
        Tag keepTag = m_nodeFactory.createTagNode(null, 0, 0, attributeList);
        boolean result = m_nodeFactory.addTagPreserve(keepTag);
        return result;
    }
1209573
public static Tag getTag(String name) {

        Tag tag = TAGS.get(name);

        if (tag == null) {
            throw new RuntimeException("unknown tag: " + name);
        }

        return tag;
    }
1135650
public function updateTagName($tagId, $tagName)
    {
        $result = $this->httpRaw(self::WECHAT_TAG_CREATE_PREFIX, [
            'tagid' => $tagId,
            'tagname' => $tagName
        ], [
            'access_token' => $this->getAccessToken()
        ]);
        return isset($result['errcode']) && ($result['errcode'] ? $this->dump([$result,$this->getAccessToken()]) : !$result['errcode']);
    }
305808
public TagType<TldTaglibType<T>> getOrCreateTag()
   {
      List<Node> nodeList = childNode.get("tag");
      if (nodeList != null &&  nodeList.size() > 0)
      {
         return new TagTypeImpl<TldTaglibType<T>>(this, "tag", childNode, nodeList.get(0));
      }
      return createTag();
   }
356502
public <T extends Tag> T get(String tagName) {
        return (T) this.value.get(tagName);
    }
985673
public Tag getOrCreateTag(String tagName, boolean isRef)
    {
        if (null == tagName)
            throw new IllegalArgumentException("Looking for a null tag name.");
        tagName = Tag.normalizeName(tagName);

        synchronized (this.definedTags)
        {
            if (definedTags.containsKey(tagName))
                return definedTags.get(tagName);
            else
            {
                final Tag tag = new Tag(tagName);
                definedTags.put(tagName, tag);
                return tag;
            }
        }
    }
803281
@SuppressWarnings("unchecked")
  public <T extends Tag> T getTag(Class<T> tagClass) {
    List<T> matches = getTags(tagClass);
    T matchingTag = null;
    if (matches.size() > 0) {
      matchingTag = matches.get(0);
    }
//    if (matches.size() >= 2) {
//      throw new IllegalStateException("Multiple identical tags found (" + matches + ")");
//    }
//    else if (matches.size() == 1) {
//      matchingTag = matches.get(0);
//    }
    return matchingTag;
  }
729116
public GetUsersResponse getUsersByTagId(Integer tagId, String nextOpenid) {
        BeanUtil.requireNonNull(tagId, "tagId is null");
        GetUsersResponse response;
        LOG.debug("开始获取标签下粉丝.....");
        String url = BASE_API_URL + "cgi-bin/user/tag/get?access_token=#";
        Map<String, Object> param = new HashMap<String, Object>();
        param.put("tagid", tagId);
        param.put("next_openid", null == nextOpenid ? "" : nextOpenid);
        BaseResponse r = executePost(url, JSONUtil.toJson(param));
        String resultJson = isSuccess(r.getErrcode()) ? r.getErrmsg() : r.toJsonString();
        response = JSONUtil.toBean(resultJson, GetUsersResponse.class);
        return response;
    }
388015
public void removeTag(String tagName) {
    for (int i = 0; i < tags.size(); i++) {
      if (tags.get(i).getName().equals(tagName)) {
        tags.remove(i);
        if (hashTagsName.containsKey(tagName))
          hashTagsName.remove(tagName);
        if (hashTagsId.containsKey(TiffTags.getTagId(tagName)))
          hashTagsId.remove(TiffTags.getTagId(tagName));
        i--;
      }
    }
  }