Class NamingRules

java.lang.Object
org.tentackle.common.NamingRules

@Service(NamingRules.class) public class NamingRules extends Object
Naming rules for classnames.
Used at runtime to determine the remote delegates, at build-time by some wurblets, and by the wizard to generate PDO- and operation sources.
Can be replaced via @Service for application-specific rules.
  • Constructor Details

    • NamingRules

      public NamingRules()
  • Method Details

    • getInstance

      public static NamingRules getInstance()
      The naming rules singleton.
      Returns:
      the singleton
    • getPdoDomainInterface

      public String getPdoDomainInterface(String pdoName)
      Gets the simple class name of the domain interface of a PDO.
      Parameters:
      pdoName - the PDO name
      Returns:
      the interface name
    • getPdoFromDomainInterface

      public String getPdoFromDomainInterface(String domainInterface)
      Gets the PDO name from the name of a domain interface.
      Parameters:
      domainInterface - the interface name
      Returns:
      the PDO name, null if domainInterface is not a valid PDO domain interface name
    • getPdoPersistenceInterface

      public String getPdoPersistenceInterface(String pdoName)
      Gets the simple class name of the persistence interface of a PDO.
      Parameters:
      pdoName - the PDO name
      Returns:
      the interface name
    • getPdoFromPersistenceInterface

      public String getPdoFromPersistenceInterface(String persistenceInterface)
      Gets the PDO name from the name of a persistence interface.
      Parameters:
      persistenceInterface - the interface name
      Returns:
      the PDO name, null if persistenceInterface is not a valid PDO persistence interface name
    • getPdoDomainImplementation

      public String getPdoDomainImplementation(String pdoName)
      Gets the simple class name of the domain implementation of a PDO.
      Parameters:
      pdoName - the PDO name
      Returns:
      the implementation name
    • getPdoFromDomainImplementation

      public String getPdoFromDomainImplementation(String domainImplementation)
      Gets the PDO name from the name of a domain implementation.
      Parameters:
      domainImplementation - the implementation name
      Returns:
      the PDO name, null if domainImplementation is not a valid PDO domain implementation name
    • getPdoPersistenceImplementation

      public String getPdoPersistenceImplementation(String pdoName)
      Gets the simple class name of the persistence implementation of a PDO.
      Parameters:
      pdoName - the PDO name
      Returns:
      the implementation name
    • getPdoFromPersistenceImplementation

      public String getPdoFromPersistenceImplementation(String persistenceImplementation)
      Gets the PDO name from the name of a persistence implementation.
      Parameters:
      persistenceImplementation - the implementation name
      Returns:
      the PDO name, null if persistenceImplementation is not a valid PDO persistence implementation name
    • getPdoRemoteInterface

      public String getPdoRemoteInterface(String pdoName)
      Gets the simple class name of the remote interface of a PDO.
      Parameters:
      pdoName - the PDO name
      Returns:
      the interface name
    • getPdoFromRemoteInterface

      public String getPdoFromRemoteInterface(String remoteInterface)
      Gets the PDO name from the name of a remote interface.
      Parameters:
      remoteInterface - the interface name
      Returns:
      the PDO name, null if remoteInterface is not a valid PDO remote interface name
    • getPdoRemoteImplementation

      public String getPdoRemoteImplementation(String pdoName)
      Gets the simple class name of the remote implementation of a PDO.
      Parameters:
      pdoName - the PDO name
      Returns:
      the implementation name
    • getPdoFromRemoteImplementation

      public String getPdoFromRemoteImplementation(String remoteImplementation)
      Gets the PDO name from the name of a remote implementation.
      Parameters:
      remoteImplementation - the implementation name
      Returns:
      the PDO name, null if remoteImplementation is not a valid PDO remote implementation name
    • getPdoRemoteInterfacePackageName

      public String getPdoRemoteInterfacePackageName(String pdoPersistenceImplementationPackageName)
      Gets the package name of the remote interface of a PDO.
      Parameters:
      pdoPersistenceImplementationPackageName - the package name of the persistence implementation
      Returns:
      the package name of the remote interface
    • getPdoRemoteImplementationPackageName

      public String getPdoRemoteImplementationPackageName(String pdoPersistenceImplementationPackageName)
      Gets the package name of the remote implementation of a PDO.
      Parameters:
      pdoPersistenceImplementationPackageName - the package name of the persistence implementation
      Returns:
      the package name of the remote implementation
    • getOperationDomainInterface

      public String getOperationDomainInterface(String operationName)
      Gets the simple class name of the domain interface of an operation.
      Parameters:
      operationName - the operation name
      Returns:
      the interface name
    • getOperationFromDomainInterface

      public String getOperationFromDomainInterface(String domainInterface)
      Gets the operation name from the name of a domain interface.
      Parameters:
      domainInterface - the interface name
      Returns:
      the operation name, null if domainInterface is not a valid operation domain interface name
    • getOperationPersistenceInterface

      public String getOperationPersistenceInterface(String operationName)
      Gets the simple class name of the persistence interface of an operation.
      Parameters:
      operationName - the operation name
      Returns:
      the interface name
    • getOperationFromPersistenceInterface

      public String getOperationFromPersistenceInterface(String persistenceInterface)
      Gets the operation name from the name of a persistence interface.
      Parameters:
      persistenceInterface - the interface name
      Returns:
      the operation name, null if persistenceInterface is not a valid operation persistence interface name
    • getOperationDomainImplementation

      public String getOperationDomainImplementation(String operationName)
      Gets the simple class name of the domain implementation of an operation.
      Parameters:
      operationName - the operation name
      Returns:
      the implementation name
    • getOperationFromDomainImplementation

      public String getOperationFromDomainImplementation(String domainImplementation)
      Gets the operation name from the name of a domain implementation.
      Parameters:
      domainImplementation - the implementation name
      Returns:
      the operation name, null if domainImplementation is not a valid operation domain implementation name
    • getOperationPersistenceImplementation

      public String getOperationPersistenceImplementation(String operationName)
      Gets the simple class name of the persistence implementation of an operation.
      Parameters:
      operationName - the operation name
      Returns:
      the implementation name
    • getOperationFromPersistenceImplementation

      public String getOperationFromPersistenceImplementation(String persistenceImplementation)
      Gets the operation name from the name of a persistence implementation.
      Parameters:
      persistenceImplementation - the implementation name
      Returns:
      the operation name, null if persistenceImplementation is not a valid operation persistence implementation name
    • getOperationRemoteInterface

      public String getOperationRemoteInterface(String operationName)
      Gets the simple class name of the remote interface of an operation.
      Parameters:
      operationName - the operation name
      Returns:
      the interface name
    • getOperationFromRemoteInterface

      public String getOperationFromRemoteInterface(String remoteInterface)
      Gets the operation name from the name of a remote interface.
      Parameters:
      remoteInterface - the interface name
      Returns:
      the operation name, null if remoteInterface is not a valid operation remote interface name
    • getOperationRemoteImplementation

      public String getOperationRemoteImplementation(String operationName)
      Gets the simple class name of the remote implementation of an operation.
      Parameters:
      operationName - the operation name
      Returns:
      the implementation name
    • getOperationFromRemoteImplementation

      public String getOperationFromRemoteImplementation(String remoteImplementation)
      Gets the operation name from the name of a remote implementation.
      Parameters:
      remoteImplementation - the implementation name
      Returns:
      the operation name, null if remoteImplementation is not a valid operation remote implementation name
    • getOperationRemoteInterfacePackageName

      public String getOperationRemoteInterfacePackageName(String operationPersistenceImplementationPackageName)
      Gets the package name of the remote interface of an operation.
      Parameters:
      operationPersistenceImplementationPackageName - the package name of the persistence implementation
      Returns:
      the package name of the remote interface
    • getOperationRemoteImplementationPackageName

      public String getOperationRemoteImplementationPackageName(String operationPersistenceImplementationPackageName)
      Gets the package name of the remote implementation of an operation.
      Parameters:
      operationPersistenceImplementationPackageName - the package name of the persistence implementation
      Returns:
      the package name of the remote implementation