本文整理汇总了Java中org.kuali.rice.krad.bo.SessionDocument.isEncrypted方法的典型用法代码示例。如果您正苦于以下问题:Java SessionDocument.isEncrypted方法的具体用法?Java SessionDocument.isEncrypted怎么用?Java SessionDocument.isEncrypted使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.kuali.rice.krad.bo.SessionDocument
的用法示例。
在下文中一共展示了SessionDocument.isEncrypted方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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;
}
示例2: 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;
}
示例3: 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;
}