本文整理汇总了Java中com.helger.peppol.url.PeppolURLProvider类的典型用法代码示例。如果您正苦于以下问题:Java PeppolURLProvider类的具体用法?Java PeppolURLProvider怎么用?Java PeppolURLProvider使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
PeppolURLProvider类属于com.helger.peppol.url包,在下文中一共展示了PeppolURLProvider类的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: showSelectedObject
import com.helger.peppol.url.PeppolURLProvider; //导入依赖的package包/类
@Override
protected void showSelectedObject (@Nonnull final WebPageExecutionContext aWPEC,
@Nonnull final IReIndexWorkItem aSelectedObject)
{
final HCNodeList aNodeList = aWPEC.getNodeList ();
final Locale aDisplayLocale = aWPEC.getDisplayLocale ();
final IPeppolURLProvider aURLProvider = PeppolURLProvider.INSTANCE;
final IIndexerWorkItem aWorkItem = aSelectedObject.getWorkItem ();
final IParticipantIdentifier aParticipantID = aWorkItem.getParticipantID ();
final BootstrapViewForm aViewForm = aNodeList.addAndReturnChild (new BootstrapViewForm ());
aViewForm.addFormGroup (new BootstrapFormGroup ().setLabel ("Creation datetime")
.setCtrl (PDTToString.getAsString (aWorkItem.getCreationDateTime (),
aDisplayLocale)));
aViewForm.addFormGroup (new BootstrapFormGroup ().setLabel ("Participant ID")
.setCtrl (aParticipantID.getURIEncoded ()));
final String sBCSuffix = "/businesscard/" + aParticipantID.getURIPercentEncoded ();
final ISMLInfo aSML = PDServerConfiguration.getSMLToUse ();
if (aSML != null)
{
aViewForm.addFormGroup (new BootstrapFormGroup ().setLabel ("Business Card URL")
.setCtrl (new HCDiv ().addChild (HCA.createLinkedWebsite (aURLProvider.getSMPURIOfParticipant (aParticipantID,
aSML)
.toString () +
sBCSuffix))));
}
else
{
aViewForm.addFormGroup (new BootstrapFormGroup ().setLabel ("Business Card URL")
.setCtrl (new HCDiv ().addChild (HCA.createLinkedWebsite (aURLProvider.getSMPURIOfParticipant (aParticipantID,
ESML.DIGIT_PRODUCTION)
.toString () +
sBCSuffix)),
new HCDiv ().addChild ("or"),
new HCDiv ().addChild (HCA.createLinkedWebsite (aURLProvider.getSMPURIOfParticipant (aParticipantID,
ESML.DIGIT_TEST)
.toString () +
sBCSuffix))));
}
aViewForm.addFormGroup (new BootstrapFormGroup ().setLabel ("Action type")
.setCtrl (aWorkItem.getType ().getDisplayName ()));
aViewForm.addFormGroup (new BootstrapFormGroup ().setLabel ("Owner").setCtrl (aWorkItem.getOwnerID ()));
aViewForm.addFormGroup (new BootstrapFormGroup ().setLabel ("Requesting host")
.setCtrl (aWorkItem.getRequestingHost ()));
aViewForm.addFormGroup (new BootstrapFormGroup ().setLabel ("Retries so far")
.setCtrl (Integer.toString (aSelectedObject.getRetryCount ())));
if (aSelectedObject.hasPreviousRetryDT ())
aViewForm.addFormGroup (new BootstrapFormGroup ().setLabel ("Previous retry")
.setCtrl (PDTToString.getAsString (aSelectedObject.getPreviousRetryDT (),
aDisplayLocale)));
if (!m_bDeadIndex)
aViewForm.addFormGroup (new BootstrapFormGroup ().setLabel ("Next retry")
.setCtrl (PDTToString.getAsString (aSelectedObject.getNextRetryDT (),
aDisplayLocale)));
aViewForm.addFormGroup (new BootstrapFormGroup ().setLabel ("Last retry")
.setCtrl (PDTToString.getAsString (aSelectedObject.getMaxRetryDT (),
aDisplayLocale)));
}