public void createGroupPostProcess(@Nonnull final Group group)
    {
        // Adds default properties if they don't exist.
        if (group.getSharedWith() == null) {
            group.shareWithNobody();
        }

        // Update caches.
        clearGroupNameCache();
        clearGroupCountCache();
        evictCachedUsersForGroup(group);
        evictCachedPaginatedGroupNames();

        groupCache.put(group.getName(), CacheableOptional.of(group));

        // Fire event.
        GroupEventDispatcher.dispatchEvent(group, GroupEventDispatcher.EventType.group_created, Collections.emptyMap());
    }
Updates the caches maintained by this manager and dispatches events that reflect a new group having been created.

This method is intended to be invoked to update the internal state of GroupManager after a group has been
created. It should rarely be invoked by code that is not part of the GroupManager implementation.

@param group The group that has been created.
xmppserver/src/main/java/org/jivesoftware/openfire/group/GroupManager.java