class PublisherModel implements Serializable {

    public final static PublisherModel open = new OpenPublisher();
    public final static PublisherModel publishers = new OnlyPublishers();
    public final static PublisherModel subscribers = new OnlySubscribers();

    /**
     * Returns the specific subclass of PublisherModel as specified by the publisher
     * model name. If an unknown name is specified then an IllegalArgumentException
     * is going to be thrown.
     *
     * @param name the name of the subsclass.
     * @return the specific subclass of PublisherModel as specified by the access
     *         model name.
     */
    public static PublisherModel valueOf(String name) {<FILL_FUNCTION_BODY>}
    /**
     * Returns the name as defined by the JEP-60 spec.
     *
     * @return the name as defined by the JEP-60 spec.
     */
    public abstract String getName();

    /**
     * Returns true if the entity is allowed to publish items to the specified node.
     *
     * @param node       the node that may get a new published item by the specified entity.
     * @param entity     the JID of the entity that wants to publish an item to the node.
     * @return true if the subscriber is allowed to publish items to the specified node.
     */
    public abstract boolean canPublish(Node node, JID entity);

}

        if ("open".equals(name)) {
            return open;
        }
        else if ("publishers".equals(name)) {
            return publishers;
        }
        else if ("subscribers".equals(name)) {
            return subscribers;
        }
        throw new IllegalArgumentException("Unknown publisher model: " + name);
    
<no_super_class>