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


Java DocumentViewPresentationControllerBase类代码示例

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


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

示例1: performInitialization

import org.kuali.rice.krad.document.DocumentViewPresentationControllerBase; //导入依赖的package包/类
/**
 * The following initialization is performed:
 *
 * <ul>
 * <li>Retrieve the document entry</li>
 * <li>Set up the document view authorizer and presentation controller</li>
 * </ul>
 *
 * @see org.kuali.rice.krad.uif.container.ContainerBase#performInitialization(org.kuali.rice.krad.uif.view.View,
 *      java.lang.Object)
 */
@Override
public void performInitialization(View view, Object model) {
    super.performInitialization(view, model);

    // get document entry
    DocumentEntry documentEntry = getDocumentEntryForView();
    pushObjectToContext(UifConstants.ContextVariableNames.DOCUMENT_ENTRY, documentEntry);

    // setup authorizer and presentation controller using the configured authorizer and pc for document
    if (getAuthorizer() == null) {
        setAuthorizer(new DocumentViewAuthorizerBase());
    }

    if (getAuthorizer() instanceof DocumentViewAuthorizerBase) {
        DocumentViewAuthorizerBase documentViewAuthorizerBase = (DocumentViewAuthorizerBase) getAuthorizer();
        if (documentViewAuthorizerBase.getDocumentAuthorizer() == null) {
            documentViewAuthorizerBase.setDocumentAuthorizerClass(documentEntry.getDocumentAuthorizerClass());
        }
    }

    if (getPresentationController() == null) {
        setPresentationController(new DocumentViewPresentationControllerBase());
    }

    if (getPresentationController() instanceof DocumentViewPresentationControllerBase) {
        DocumentViewPresentationControllerBase documentViewPresentationControllerBase =
                (DocumentViewPresentationControllerBase) getPresentationController();
        if (documentViewPresentationControllerBase.getDocumentPresentationController() == null) {
            documentViewPresentationControllerBase.setDocumentPresentationControllerClass(
                    documentEntry.getDocumentPresentationControllerClass());
        }
    }

    getObjectPathToConcreteClassMapping().put(getDefaultBindingObjectPath(), getDocumentClass());
}
 
开发者ID:aapotts,项目名称:kuali_rice,代码行数:47,代码来源:DocumentView.java

示例2: performInitialization

import org.kuali.rice.krad.document.DocumentViewPresentationControllerBase; //导入依赖的package包/类
/**
 * The following initialization is performed:
 *
 * <ul>
 * <li>Retrieve the document entry</li>
 * <li>Makes sure that the header is set.</li>
 * <li>Set up the document view authorizer and presentation controller</li>
 * </ul>
 *
 * {@inheritDoc}
 */
@Override
public void performInitialization(Object model) {
    super.performInitialization(model);

    // get document entry
    DocumentEntry documentEntry = getDocumentEntryForView();
    pushObjectToContext(UifConstants.ContextVariableNames.DOCUMENT_ENTRY, documentEntry);

    // default document type on the header
    String documentTypeName = documentEntry.getDocumentTypeName();
    DocumentType documentType = KewApiServiceLocator.getDocumentTypeService().getDocumentTypeByName(documentTypeName);

    if (getHeader() != null && StringUtils.isBlank(getHeaderText())) {
        setHeaderText(documentType.getLabel());
    }

    // setup authorizer and presentation controller using the configured authorizer and pc for document
    if (getAuthorizer() == null) {
        setAuthorizer(new DocumentViewAuthorizerBase());
    }

    if (getAuthorizer() instanceof DocumentViewAuthorizerBase) {
        DocumentViewAuthorizerBase documentViewAuthorizerBase = (DocumentViewAuthorizerBase) getAuthorizer();
        if (documentViewAuthorizerBase.getDocumentAuthorizer() == null) {
            documentViewAuthorizerBase.setDocumentAuthorizerClass(documentEntry.getDocumentAuthorizerClass());
        }
    }

    if (getPresentationController() == null) {
        setPresentationController(new DocumentViewPresentationControllerBase());
    }

    if (getPresentationController() instanceof DocumentViewPresentationControllerBase) {
        DocumentViewPresentationControllerBase documentViewPresentationControllerBase =
                (DocumentViewPresentationControllerBase) getPresentationController();
        if (documentViewPresentationControllerBase.getDocumentPresentationController() == null) {
            documentViewPresentationControllerBase.setDocumentPresentationControllerClass(
                    documentEntry.getDocumentPresentationControllerClass());
        }
    }

    getObjectPathToConcreteClassMapping().put(getDefaultBindingObjectPath(), getDocumentClass());
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:55,代码来源:DocumentView.java


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