/*
(non-Javadoc)
@see com.popbill.api.HTCashbillService#registDeptUser(java.lang.String, java.lang.String, java.lang.String)
335998
public Response registDeptUser(String CorpNum, String DeptUserID, String DeptUserPWD) throws PopbillException{
		if (CorpNum == null || CorpNum.isEmpty())
			throw new PopbillException(-99999999, "연동회원 사업자번호(CorpNum)가 입력되지 않았습니다.");
		if (DeptUserID == null || DeptUserID.isEmpty())
			throw new PopbillException(-99999999, "홈택스 부서사용자 계정 아이디(DeptUserID)가 입력되지 않았습니다.");
		if (DeptUserPWD == null || DeptUserPWD.isEmpty())
			throw new PopbillException(-99999999, "홈택스 부서사용자 계정 비밀번호(DeptUserPWD)가 입력되지 않았습니다.");
			
		DeptRequest request = new DeptRequest();
		request.id = DeptUserID;
		request.pwd = DeptUserPWD;
		
		String PostData = toJsonString(request);		

		return httppost("/HomeTax/Cashbill/DeptUser", CorpNum, PostData, null, Response.class);

	}
699923
@SuppressWarnings({"UnusedDeclaration"})
    public void doSubmit(StaplerRequest req, StaplerResponse resp) throws IOException, ServletException {
        getACL().checkPermission(getPermission());

        bindParameters(req);
        // current user is bound to the thread and will be lost in the perform method
        User user = User.current();
        String ciUser = (user == null) ? "anonymous" : user.getId();

        JSONObject formData = req.getSubmittedForm();
        if (formData.has("promotionPlugin")) {
            JSONObject pluginSettings = formData.getJSONObject("promotionPlugin");
            if (pluginSettings.has("pluginName")) {
                String pluginName = pluginSettings.getString("pluginName");
                if (!UserPluginInfo.NO_PLUGIN_KEY.equals(pluginName)) {
                    PluginSettings settings = new PluginSettings();
                    Map<String, String> paramMap = Maps.newHashMap();
                    settings.setPluginName(pluginName);
                    Map<String, Object> filteredPluginSettings = Maps.filterKeys(pluginSettings,
                            new Predicate<String>() {
                                public boolean apply(String input) {
                                    return StringUtils.isNotBlank(input) && !"pluginName".equals(input);
                                }
                            });
                    for (Map.Entry<String, Object> settingsEntry : filteredPluginSettings.entrySet()) {
                        String key = settingsEntry.getKey();
                        paramMap.put(key, pluginSettings.getString(key));
                    }
                    paramMap.put("ciUser", ciUser);
                    if (!paramMap.isEmpty()) {
                        settings.setParamMap(paramMap);
                    }
                    setPromotionPlugin(settings);
                }
            }
        }

        final BuildInfoAwareConfigurator configurator = getCurrentConfigurator();
        ArtifactoryServer server = configurator.getArtifactoryServer();

        new PromoteWorkerThread(server, CredentialManager.getPreferredDeployer((DeployerOverrider) configurator, server), ciUser).start();

        resp.sendRedirect(".");
    }
660271
@Override
  public void addUserMetadata(String key, String value)
  {
    userDefinedMetadata.put(key, value);
  }
953715
@Override
    public final void setApiUserId(String value) {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(this, tc, "setApiUserId", value);
        setUserid(value);
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(this, tc, "setApiUserId");
    }
1048134
public void setUserEmailList(java.util.Collection<String> userEmailList) {
        if (userEmailList == null) {
            this.userEmailList = null;
            return;
        }

        this.userEmailList = new java.util.ArrayList<String>(userEmailList);
    }
557303
@Override
	public Response register(String CorpNum, Cashbill cashbill)
			throws PopbillException {
		return register(CorpNum, cashbill, null);
	}
712495
@Override
    public IssueResponse registIssue(String CorpNum, Taxinvoice taxinvoice,
                                String Memo, Boolean ForceIssue) throws PopbillException {

        return registIssue(CorpNum, taxinvoice, false, Memo, ForceIssue, null, null, null);
    }
1217489
public void setCommerceDiscountUserSegmentRelService(
		com.liferay.commerce.discount.service.CommerceDiscountUserSegmentRelService commerceDiscountUserSegmentRelService) {
		this.commerceDiscountUserSegmentRelService = commerceDiscountUserSegmentRelService;
	}
488957
@Override
    public Response register(String CorpNum, Taxinvoice taxinvoice,
                             String UserID, boolean writeSpecification) throws PopbillException {
        if (taxinvoice == null)
            throw new PopbillException(-99999999, "세금계산서 정보가 입력되지 않았습니다.");

        String PostData = toJsonString(taxinvoice);

        if (writeSpecification) {
            PostData = "{\"writeSpecification\":true," + PostData.substring(1);
        }

        return httppost("/Taxinvoice", CorpNum, PostData, UserID,
                Response.class);
    }
807515
private function isAddressBillingAddress(array $addressData, TdbDataExtranetUser $user)
    {
        if (false === isset($addressData['id'])) {
            return false;
        }
        if ($addressData['id'] !== $user->fieldDefaultBillingAddressId) {
            return false;
        }

        return true;
    }
1327236
public void addUser(PrincipalUser user) {
        SystemAssert.requireArgument(user != null, "Null user can not be added.");
        users.add(user);
    }
723737
public Member registerAndEnroll(RegistrationRequest registrationRequest) throws RegistrationException, EnrollmentException {
        Member member = getMember(registrationRequest.getEnrollmentID());
        member.registerAndEnroll(registrationRequest);
        return member;
    }
564454
@Override
	public Response registIssue(String CorpNum, Statement statement, String memo, 
			String UserID) throws PopbillException {
			
		statement.setMemo(memo);
		
		String PostData = toJsonString(statement);
		
		return httppost("/Statement",
				CorpNum, PostData, UserID, "ISSUE", Response.class);
	}
811758
public Response deleteDeptUser(String corpNum) throws PopbillException{
		if (corpNum == null || corpNum.isEmpty())
			throw new PopbillException(-99999999, "연동회원 사업자번호(corpNum)가 입력되지 않았습니다.");
		
		return httppost("/HomeTax/Taxinvoice/DeptUser", corpNum, null, null, "DELETE", Response.class);
	}
778250
public <T extends CounterListener> Handle<T> registerUserListener(ByteString counterName, T userListener) {
      ByRef<Handle<T>> handleByRef = new ByRef<>(null);
      counters.computeIfPresent(counterName, (name, holder) -> holder.addListener(userListener, handleByRef));
      return handleByRef.get();
   }
1336334
public boolean checkUser(String globusID, String userID) {
        if (globusID == null) {
            throw new IllegalArgumentException(i18n.getMessage("glousIdNull"));
        }
        if (userID == null) {
            throw new IllegalArgumentException(i18n.getMessage("userIdNull"));
        }

        if (this.map == null) {
            return false;
        }

        GridMapEntry entry = (GridMapEntry)this.map.get(normalizeDN(globusID));
        return (entry == null) ? false : entry.containsUserID(userID);
    }
1367653
public final void setSecurityUserid(String value) {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(this, tc, "setSecurityUserid", value);
        jmo.setField(JsHdrAccess.SECURITYUSERID, value);
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(this, tc, "setSecurityUserid");
    }