- super("createSone.html", template, "Page.CreateSone.Title", webInterface);
+ super("createSone.html", template, "Page.CreateSone.Title", webInterface, false);
+ }
+
+ //
+ // STATIC ACCESSORS
+ //
+
+ /**
+ * Returns a sorted list of all own identities that do not have the “Sone”
+ * context.
+ *
+ * @param core
+ * The core
+ * @return The list of own identities without the “Sone” context
+ */
+ public static List<OwnIdentity> getOwnIdentitiesWithoutSone(Core core) {
+ List<OwnIdentity> identitiesWithoutSone = new ArrayList<OwnIdentity>();
+ Set<OwnIdentity> allOwnIdentity = core.getIdentityManager().getAllOwnIdentities();
+ for (OwnIdentity ownIdentity : allOwnIdentity) {
+ if (!ownIdentity.hasContext("Sone")) {
+ identitiesWithoutSone.add(ownIdentity);
+ }
+ }
+ Collections.sort(identitiesWithoutSone, new Comparator<OwnIdentity>() {
+
+ @Override
+ public int compare(OwnIdentity leftIdentity, OwnIdentity rightIdentity) {
+ return (leftIdentity.getNickname() + "@" + leftIdentity.getId()).compareToIgnoreCase(rightIdentity.getNickname() + "@" + rightIdentity.getId());
+ }
+ });
+ return identitiesWithoutSone;