Examples of CollaboratorAbstract


Examples of framework.beans.collaborator.CollaboratorAbstract

   * @throws ClipsServerException
     */
    @Override
    public int login(Object aCollaboratorID, byte[] tryPasswdHash) throws Exception, ClipsServerException {
        cleanOldSessions();
        CollaboratorAbstract colEntity = findEntity(CollaboratorAbstract.class, (Integer) aCollaboratorID, "сотрудники");
        if (sessionPassword == null) {
            throw new ESecurity("Внутренняя ошибка: Перед вызовом login должен быть вызван getEncryptor ");
        }

        //check is admin or not
        ServConfig sc = manager.find(ServConfig.class, ConfigParametrAbstract.ID_ADMIN_PASSWORD_HASH);
        String adminPassword = (sc == null) ? null : sc.getStrvalue();

        boolean isSuperUser = false;
        if (adminPassword != null && !adminPassword.isEmpty()) {
            isSuperUser = sessionPassword.verifyHash(tryPasswdHash,
                    SessionPassword.char2byte(adminPassword.toCharArray()));
        } else {
            isSuperUser = sessionPassword.verifyPassword(tryPasswdHash, DEFAULT_ADMIN_PASSWORD);
        }

        if (!isSuperUser) {
            if(useLDAP) {
                checkLDAP(colEntity.getLdapName(), tryPasswdHash);
            } else {
                if (colEntity.getPasswordHash() == null) {
                    throw new ESecurity("У Вас не установлен пароль, поэтому вход в систему невозможен. Обратитесь к администратору");
                }

                if (!sessionPassword.verifyHash(tryPasswdHash, colEntity.getPasswordHash())) {
                    sessionPassword = null;
                    try {
                        Thread.sleep(1000);
                    } catch (InterruptedException e) {
                        // DO NOTHING
View Full Code Here

Examples of framework.beans.collaborator.CollaboratorAbstract

     * @param dst
     * @throws framework.generic.ClipsServerException
     */
    private void copyServices(Contract src, Contract dst, List<AuditDoc> auditDocList) throws ClipsServerException, CloneNotSupportedException {
        List<ServicePrice> svs = findEntityList(ServicePrice.class, "contract", src);
        CollaboratorAbstract collab = getCollaborator();
        for (ServicePrice b : svs) {
            AuditDoc<ServicePrice> auditDoc = new AuditDoc<ServicePrice>(null, collab);
            auditDocList.add(auditDoc);
            ServicePrice sv = ((ServicePrice) (b).clone());
            sv.setContract(dst);
View Full Code Here

Examples of framework.beans.collaborator.CollaboratorAbstract

     * @param dst
     * @throws framework.generic.ClipsServerException
     */
    private void copyPackets(Contract src, Contract dst, List<AuditDoc> auditDocList) throws ClipsServerException, CloneNotSupportedException {
        List<ContractPacket> cps = findEntityList(ContractPacket.class, "key.contract", src.getId());
        CollaboratorAbstract collab = getCollaborator();
        for (ContractPacket b : cps) {
            AuditDoc<ContractPacket> auditDoc = new AuditDoc<ContractPacket>(null, collab);
            auditDocList.add(auditDoc);
            ContractPacket cp = ((ContractPacket) (b).clone());
            cp.setKey(new ContractPacketPK(dst.getId(), cp.getKey().getPacketTemplate()));
View Full Code Here

Examples of framework.beans.collaborator.CollaboratorAbstract

            "AND (a.tillDate > :currentDate OR a.tillDate IS NULL) " +
            "AND a.trash = false");
        q.setParameter("srcContractId", src.getId());
        q.setParameter("currentDate", GregorianCalendar.getInstance().getTime());
        List<Polis> polisList = q.getResultList();
        CollaboratorAbstract collab = getCollaborator();
        for (int i = 0; i < polisList.size(); i++) {
            Polis pOld = polisList.get(i);
            if ((i % 100) == 0) {
                System.out.println("Скопировано полисов - " + i + " (" + i*100.0/polisList.size() + "%)");
            }
View Full Code Here

Examples of framework.beans.collaborator.CollaboratorAbstract

        for (ServicePrice servicePrice : prices) {
            priceMap.put(servicePrice.getReceptionType().getExtKey() + servicePrice.getService().getCode(), servicePrice);
        }

        ArrayList<AuditDetails> auditDetList = new ArrayList<AuditDetails>();
        CollaboratorAbstract collab = getCollaborator();
        for (VisitPrice visitPrice : visitPriceList) {
            if (Float.parseFloat(visitPrice.getPrice()) == 0) {
                continue;
            }
            String rt;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.