当前位置: 首页>>代码示例>>Java>>正文


Java SessionDocument类代码示例

本文整理汇总了Java中org.kuali.rice.krad.bo.SessionDocument的典型用法代码示例。如果您正苦于以下问题:Java SessionDocument类的具体用法?Java SessionDocument怎么用?Java SessionDocument使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


SessionDocument类属于org.kuali.rice.krad.bo包,在下文中一共展示了SessionDocument类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: retrieveDocumentForm

import org.kuali.rice.krad.bo.SessionDocument; //导入依赖的package包/类
@Deprecated
protected Object retrieveDocumentForm(UserSession userSession, String sessionId, String documentNumber,
        String ipAddress) throws Exception {
    HashMap<String, String> primaryKeys = new HashMap<String, String>(4);
    primaryKeys.put(SESSION_ID, sessionId);
    if (documentNumber != null) {
        primaryKeys.put(DOCUMENT_NUMBER, documentNumber);
    }
    primaryKeys.put(PRINCIPAL_ID, userSession.getPrincipalId());
    primaryKeys.put(IP_ADDRESS, ipAddress);

    SessionDocument sessionDoc = legacyDataAdapter.findByPrimaryKey(SessionDocument.class, primaryKeys);
    if (sessionDoc != null) {
        byte[] formAsBytes = sessionDoc.getSerializedDocumentForm();
        if (sessionDoc.isEncrypted()) {
            formAsBytes = getEncryptionService().decryptBytes(formAsBytes);
        }
        ByteArrayInputStream baip = new ByteArrayInputStream(formAsBytes);
        ObjectInputStream ois = new ObjectInputStream(baip);

        return ois.readObject();
    }

    return null;
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:26,代码来源:SessionDocumentServiceImpl.java

示例2: purgeDocumentForm

import org.kuali.rice.krad.bo.SessionDocument; //导入依赖的package包/类
/**
 * @see org.kuali.rice.krad.service.SessionDocumentService#purgeDocumentForm(String, String,
 *      org.kuali.rice.krad.UserSession, String)
 *
 * @deprecated (Deprecated and removed from use in KRAD  (KULRICE-9149)
 */
@Override
@Deprecated
public void purgeDocumentForm(String documentNumber, String docFormKey, UserSession userSession, String ipAddress) {
    synchronized (userSession) {
        LOG.debug("purge document form from session");
        userSession.removeObject(docFormKey);
        try {
            LOG.debug("purge document form from database");
            HashMap<String, String> primaryKeys = new HashMap<String, String>(4);
            primaryKeys.put(SESSION_ID, userSession.getKualiSessionId());
            primaryKeys.put(DOCUMENT_NUMBER, documentNumber);
            primaryKeys.put(PRINCIPAL_ID, userSession.getPrincipalId());
            primaryKeys.put(IP_ADDRESS, ipAddress);
            legacyDataAdapter.deleteMatching(SessionDocument.class, primaryKeys);
        } catch (Exception e) {
            LOG.error("purgeDocumentForm failed for SessId/DocNum/PrinId/IP:" + userSession.getKualiSessionId() +
                    "/" + documentNumber + "/" + userSession.getPrincipalId() + "/" + ipAddress, e);
        }
    }
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:27,代码来源:SessionDocumentServiceImpl.java

示例3: retrieveDocumentForm

import org.kuali.rice.krad.bo.SessionDocument; //导入依赖的package包/类
@Deprecated
protected Object retrieveDocumentForm(UserSession userSession, String sessionId, String documentNumber,
        String ipAddress) throws Exception {
    HashMap<String, String> primaryKeys = new HashMap<String, String>(4);
    primaryKeys.put(SESSION_ID, sessionId);
    if (documentNumber != null) {
        primaryKeys.put(DOCUMENT_NUMBER, documentNumber);
    }
    primaryKeys.put(PRINCIPAL_ID, userSession.getPrincipalId());
    primaryKeys.put(IP_ADDRESS, ipAddress);

    SessionDocument sessionDoc = getBusinessObjectService().findByPrimaryKey(SessionDocument.class, primaryKeys);
    if (sessionDoc != null) {
        byte[] formAsBytes = sessionDoc.getSerializedDocumentForm();
        if (sessionDoc.isEncrypted()) {
            formAsBytes = getEncryptionService().decryptBytes(formAsBytes);
        }
        ByteArrayInputStream baip = new ByteArrayInputStream(formAsBytes);
        ObjectInputStream ois = new ObjectInputStream(baip);

        return ois.readObject();
    }

    return null;
}
 
开发者ID:aapotts,项目名称:kuali_rice,代码行数:26,代码来源:SessionDocumentServiceImpl.java

示例4: purgeDocumentForm

import org.kuali.rice.krad.bo.SessionDocument; //导入依赖的package包/类
/**
 * @see org.kuali.rice.krad.service.SessionDocumentService#purgeDocumentForm(String, String,
 *      org.kuali.rice.krad.UserSession, String)
 *
 * @deprecated (Deprecated and removed from use in KRAD  (KULRICE-9149)
 */
@Override
@Deprecated
public void purgeDocumentForm(String documentNumber, String docFormKey, UserSession userSession, String ipAddress) {
    synchronized (userSession) {
        LOG.debug("purge document form from session");
        userSession.removeObject(docFormKey);
        try {
            LOG.debug("purge document form from database");
            HashMap<String, String> primaryKeys = new HashMap<String, String>(4);
            primaryKeys.put(SESSION_ID, userSession.getKualiSessionId());
            primaryKeys.put(DOCUMENT_NUMBER, documentNumber);
            primaryKeys.put(PRINCIPAL_ID, userSession.getPrincipalId());
            primaryKeys.put(IP_ADDRESS, ipAddress);
            getBusinessObjectService().deleteMatching(SessionDocument.class, primaryKeys);
        } catch (Exception e) {
            LOG.error("purgeDocumentForm failed for SessId/DocNum/PrinId/IP:" + userSession.getKualiSessionId() +
                    "/" + documentNumber + "/" + userSession.getPrincipalId() + "/" + ipAddress, e);
        }
    }
}
 
开发者ID:aapotts,项目名称:kuali_rice,代码行数:27,代码来源:SessionDocumentServiceImpl.java

示例5: retrieveDocumentForm

import org.kuali.rice.krad.bo.SessionDocument; //导入依赖的package包/类
protected Object retrieveDocumentForm(UserSession userSession, String sessionId, String documentNumber,
        String ipAddress) throws Exception {
    HashMap<String, String> primaryKeys = new HashMap<String, String>(4);
    primaryKeys.put(SESSION_ID, sessionId);
    if (documentNumber != null) {
        primaryKeys.put(DOCUMENT_NUMBER, documentNumber);
    }
    primaryKeys.put(PRINCIPAL_ID, userSession.getPrincipalId());
    primaryKeys.put(IP_ADDRESS, ipAddress);

    SessionDocument sessionDoc = getBusinessObjectService().findByPrimaryKey(SessionDocument.class, primaryKeys);
    if (sessionDoc != null) {
        byte[] formAsBytes = sessionDoc.getSerializedDocumentForm();
        if (sessionDoc.isEncrypted()) {
            formAsBytes = getEncryptionService().decryptBytes(formAsBytes);
        }
        ByteArrayInputStream baip = new ByteArrayInputStream(formAsBytes);
        ObjectInputStream ois = new ObjectInputStream(baip);

        return ois.readObject();
    }

    return null;
}
 
开发者ID:aapotts,项目名称:kuali_rice,代码行数:25,代码来源:SessionDocumentServiceImpl.java

示例6: purgeDocumentForm

import org.kuali.rice.krad.bo.SessionDocument; //导入依赖的package包/类
/**
 * @see org.kuali.rice.krad.service.SessionDocumentService#purgeDocumentForm(String
 *      documentNumber, String docFormKey, UserSession userSession)
 */
@Override
public void purgeDocumentForm(String documentNumber, String docFormKey, UserSession userSession, String ipAddress) {
    synchronized (userSession) {

        LOG.debug("purge document form from session");
        userSession.removeObject(docFormKey);
        try {
            LOG.debug("purge document form from database");
            HashMap<String, String> primaryKeys = new HashMap<String, String>(4);
            primaryKeys.put(SESSION_ID, userSession.getKualiSessionId());
            primaryKeys.put(DOCUMENT_NUMBER, documentNumber);
            primaryKeys.put(PRINCIPAL_ID, userSession.getPrincipalId());
            primaryKeys.put(IP_ADDRESS, ipAddress);
            getBusinessObjectService().deleteMatching(SessionDocument.class, primaryKeys);
        } catch (Exception e) {
            LOG.error("purgeDocumentForm failed for SessId/DocNum/PrinId/IP:" + userSession.getKualiSessionId() +
                    "/" + documentNumber + "/" + userSession.getPrincipalId() + "/" + ipAddress, e);
        }
    }
}
 
开发者ID:aapotts,项目名称:kuali_rice,代码行数:25,代码来源:SessionDocumentServiceImpl.java

示例7: purgeAllSessionDocuments

import org.kuali.rice.krad.bo.SessionDocument; //导入依赖的package包/类
public void purgeAllSessionDocuments(Timestamp expirationDate)throws DataAccessException {
  	Criteria criteria = new Criteria();
criteria.addLessThan(KRADPropertyConstants.LAST_UPDATED_DATE, expirationDate);
 getPersistenceBrokerTemplate().deleteByQuery(QueryFactory.newQuery(SessionDocument.class, criteria));
 //getPersistenceBrokerTemplate().clearCache();
       
  }
 
开发者ID:kuali,项目名称:kc-rice,代码行数:8,代码来源:SessionDocumentDaoOjb.java

示例8: purgeAllSessionDocuments

import org.kuali.rice.krad.bo.SessionDocument; //导入依赖的package包/类
public void purgeAllSessionDocuments(Timestamp expirationDate) {
	getDao(SessionDocument.class).purgeAllSessionDocuments(expirationDate);
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:4,代码来源:SessionDocumentDaoProxy.java

示例9: purgeAllSessionDocuments

import org.kuali.rice.krad.bo.SessionDocument; //导入依赖的package包/类
/**
 * @see org.kuali.rice.krad.dao.SessionDocumentDao#purgeAllSessionDocuments(java.sql.Timestamp)
 */
public void purgeAllSessionDocuments(Timestamp expirationDate) {
    Criteria criteria = new Criteria(SessionDocument.class.getName());
    criteria.lt(KRADPropertyConstants.LAST_UPDATED_DATE, expirationDate);
    new QueryByCriteria(entityManager, criteria, QueryByCriteriaType.DELETE).toQuery().executeUpdate();
}
 
开发者ID:aapotts,项目名称:kuali_rice,代码行数:9,代码来源:SessionDocumentDaoJpa.java


注:本文中的org.kuali.rice.krad.bo.SessionDocument类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。