@Nonnull public Iterator <IEmailAttachment> iterator () { return m_aMap.values ().iterator (); }
@Nonnull public ICommonsList <ISMPProcess> getAllProcesses () { return new CommonsArrayList <> (m_aProcesses.values ()); }
@Nonnegative public int getTotalEndpointCount () { int ret = 0; for (final ISMPProcess aProcess : m_aProcesses.values ()) ret += aProcess.getEndpointCount (); return ret; }
@Nonnull public ICommonsList <ISMPProcess> getAllProcesses () { return new CommonsArrayList <> (m_aProcesses.values ()); }
@Nonnegative public int getTotalEndpointCount () { int ret = 0; for (final ISMPProcess aProcess : m_aProcesses.values ()) ret += aProcess.getEndpointCount (); return ret; }
@Nullable @ReturnsImmutableObject public Iterable <MicroAttribute> getAttributeObjs () { if (hasNoAttributes ()) return null; return m_aAttrs.values (); }
@Nonnull @ReturnsMutableCopy public ICommonsList <IEmailAttachmentDataSource> getAsDataSourceList () { return CollectionHelper.newListMapped (m_aMap.values (), IEmailAttachment::getAsDataSource); }
@Nonnull @ReturnsMutableCopy public ICommonsList <ISMPEndpoint> getAllEndpoints () { return new CommonsArrayList <> (m_aEndpoints.values ()); }
@Nonnull @ReturnsMutableCopy public ICommonsList <ISMPEndpoint> getAllEndpoints () { return new CommonsArrayList <> (m_aEndpoints.values ()); }
@Nonnull @ReturnsMutableObject ("speed") @CodingStyleguideUnaware Collection <IEmailAttachment> directGetAllAttachments () { return m_aMap.values (); }
@Nullable @ReturnsMutableCopy public ICommonsOrderedMap <IMicroQName, String> getAllQAttributes () { if (hasNoAttributes ()) return null; return new CommonsLinkedHashMap <> (m_aAttrs.values (), IMicroAttribute::getAttributeQName, IMicroAttribute::getAttributeValue); }
@MustBeLocked (ELockType.READ) @CodingStyleguideUnaware protected final Collection <IMPLTYPE> internalGetAllSortedByKey () { return m_aMap.getSortedByKey (Comparator.naturalOrder ()).values (); }
@Override @Nonnull protected IMicroDocument createWriteData () { final IMicroDocument aDoc = new MicroDocument (); final IMicroElement eRoot = aDoc.appendElement ("root"); for (final ICommonsList <Favorite> aFavoritesOfUser : m_aMap.getSortedByKey (Comparator.naturalOrder ()).values ()) for (final Favorite aFavorite : aFavoritesOfUser) eRoot.appendChild (MicroTypeConverter.convertToMicroElement (aFavorite, ELEMENT_ITEM)); return aDoc; }
@Override protected IMicroDocument createWriteData () { final IMicroDocument aDoc = new MicroDocument (); final IMicroElement eRoot = aDoc.appendElement (ELEMENT_SYSTEM_MIGRATION_RESULTS); for (final List <SystemMigrationResult> aMigrationResults : m_aMap.getSortedByKey (Comparator.naturalOrder ()) .values ()) for (final SystemMigrationResult aMigrationResult : aMigrationResults) eRoot.appendChild (MicroTypeConverter.convertToMicroElement (aMigrationResult, ELEMENT_SYSTEM_MIGRATION_RESULT)); return aDoc; }
@Override @Nonnull protected IMicroDocument createWriteData () { final IMicroDocument aDoc = new MicroDocument (); final IMicroElement eRoot = aDoc.appendElement (ELEMENT_ROOT); for (final NamedSMTPSettings aNamedSMTPSettings : CollectionHelper.getSortedByKey (m_aMap).values ()) eRoot.appendChild (MicroTypeConverter.convertToMicroElement (aNamedSMTPSettings, ELEMENT_ITEM)); return aDoc; }
@Nonnull @ReturnsMutableCopy @MustBeLocked (ELockType.WRITE) protected ICommonsList <FailedMailData> internalRemoveAll () { final ICommonsList <FailedMailData> aTempList = new CommonsArrayList <> (m_aMap.size ()); if (!m_aMap.isEmpty ()) { aTempList.addAll (m_aMap.values ()); m_aMap.clear (); } return aTempList; }
@Nonnull public com.helger.peppol.bdxr.ProcessType getAsJAXBObjectBDXR () { final com.helger.peppol.bdxr.ProcessType ret = new com.helger.peppol.bdxr.ProcessType (); // Explicit constructor call is needed here! ret.setProcessIdentifier (new BDXRProcessIdentifier (m_aProcessIdentifier)); final com.helger.peppol.bdxr.ServiceEndpointList aEndpointList = new com.helger.peppol.bdxr.ServiceEndpointList (); for (final ISMPEndpoint aEndpoint : m_aEndpoints.values ()) aEndpointList.addEndpoint (aEndpoint.getAsJAXBObjectBDXR ()); ret.setServiceEndpointList (aEndpointList); ret.setExtension (getAsBDXRExtension ()); return ret; }
@Nonnull public com.helger.peppol.smp.ProcessType getAsJAXBObjectPeppol () { final com.helger.peppol.smp.ProcessType ret = new com.helger.peppol.smp.ProcessType (); // Explicit constructor call is needed here! ret.setProcessIdentifier (new SimpleProcessIdentifier (m_aProcessIdentifier)); final com.helger.peppol.smp.ServiceEndpointList aEndpointList = new com.helger.peppol.smp.ServiceEndpointList (); for (final ISMPEndpoint aEndpoint : m_aEndpoints.values ()) aEndpointList.addEndpoint (aEndpoint.getAsJAXBObjectPeppol ()); ret.setServiceEndpointList (aEndpointList); ret.setExtension (getAsPeppolExtension ()); return ret; }
@Nonnull public com.helger.peppol.smp.ProcessType getAsJAXBObjectPeppol () { final com.helger.peppol.smp.ProcessType ret = new com.helger.peppol.smp.ProcessType (); // Explicit constructor call is needed here! ret.setProcessIdentifier (new SimpleProcessIdentifier (m_aProcessIdentifier)); final com.helger.peppol.smp.ServiceEndpointList aEndpointList = new com.helger.peppol.smp.ServiceEndpointList (); for (final ISMPEndpoint aEndpoint : m_aEndpoints.values ()) aEndpointList.addEndpoint (aEndpoint.getAsJAXBObjectPeppol ()); ret.setServiceEndpointList (aEndpointList); ret.setExtension (getAsPeppolExtension ()); return ret; }
@Nonnull public com.helger.peppol.bdxr.ProcessType getAsJAXBObjectBDXR () { final com.helger.peppol.bdxr.ProcessType ret = new com.helger.peppol.bdxr.ProcessType (); // Explicit constructor call is needed here! ret.setProcessIdentifier (new BDXRProcessIdentifier (m_aProcessIdentifier)); final com.helger.peppol.bdxr.ServiceEndpointList aEndpointList = new com.helger.peppol.bdxr.ServiceEndpointList (); for (final ISMPEndpoint aEndpoint : m_aEndpoints.values ()) aEndpointList.addEndpoint (aEndpoint.getAsJAXBObjectBDXR ()); ret.setServiceEndpointList (aEndpointList); ret.setExtension (getAsBDXRExtension ()); return ret; }