io.legaldocml.business.impl.DefaultBusinessServiceLoader Maven / Gradle / Ivy
The newest version!
package io.legaldocml.business.impl;
import io.legaldocml.akn.AknObject;
import io.legaldocml.business.AknIdentifier;
import io.legaldocml.business.BusinessProvider;
import io.legaldocml.business.builder.BusinessBuilder;
import io.legaldocml.business.builder.BusinessPartBuilder;
import io.legaldocml.business.builder.DefaultHierachyStrategy;
/**
* @author Jacques Militello
*/
public final class DefaultBusinessServiceLoader extends BusinessProvider {
/**
* {@inheritDoc}
*/
@Override
public String name() {
return "default";
}
/**
* {@inheritDoc}
*/
@Override
public AknIdentifier newAknIdentifier(String work, String expression, String manifestation) {
return new DefaultAknIdentifier(work, expression, manifestation, "/");
}
/**
* {@inheritDoc}
*/
@Override
public AknIdentifier extractAknIdentifier(String work, String expression, String manifestation) {
return new DefaultAknIdentifier(work, expression.substring(work.length() +1), manifestation.substring(expression.length() + 1), "/");
}
/**
* {@inheritDoc}
*/
@Override
public AknIdentifier newAknIdentifierTransient() {
return new DefaultAknIdentifier("0", "0", "0", "/");
}
/**
* {@inheritDoc}
*/
@SuppressWarnings("unchecked")
@Override
public E newBuilder(String name) {
return (E) new DefaultBusinessBuilder(this, name, DefaultHierachyStrategy.COMPLETE);
}
/**
* {@inheritDoc}
*/
@Override
public E newPartBuilder(BusinessBuilder businessBuilder, AknObject parent, String name) {
return null;
}
}