def generateUseCases(basePackage, repositoryName, featureName):
    utility.createFile(featureName + "UseCase")
    utility.createFolder("usecase")
    utility.writeFile(
        featureName + "UseCase",
        helper.generateUseCaseCode(basePackage, featureName, repositoryName))
    utility.moveFileToFolder(featureName + "UseCase", "usecase")
def generateApiPart(packageName, featureName):
    utility.createFolder("api")
    serviceFileName = featureName + "Services"
    utility.createFile(serviceFileName)
    utility.writeFile(
        serviceFileName,
        helper.generateApiCode(serviceFileName, packageName, featureName))
    utility.moveFileToFolder(serviceFileName, "api")
def generateDomainRepository(repositoryName, packageName, featureName):
    utility.createFolder("repository")
    utility.createFile(featureName + "Repository")
    utility.writeFile(
        repositoryName,
        helper.generateRepositoryCode(packageName, featureName,
                                      repositoryName))
    utility.moveFileToFolder(repositoryName, "repository")
def generateRepositoryPart(packageName, featureName, repositoryName,
                           repositoryImpName):
    utility.createFolder("repository")
    utility.createFile(repositoryImpName)
    utility.writeFile(
        repositoryImpName,
        helper.generateRepositoryImpCode(packageName, featureName,
                                         repositoryName, repositoryImpName))
    utility.moveFileToFolder(repositoryImpName, "repository")
Exemplo n.º 5
0
def generateModulePart(presenterName,packageName,viewType):
    utility.createFolder(presenterName.lower()+"_module")
    utility.createFile(presenterName+"Module")
    utility.createFile(presenterName+viewType+"Module")
    utility.writeFile(presenterName+"Module",helper.generatePresenterModuleCode(packageName,presenterName))
    utility.writeFile(presenterName+viewType+"Module",helper.genereateViewModuleCode(packageName,presenterName,viewType))
    utility.moveFileToFolder(presenterName+"Module",presenterName.lower()+"_module")
    utility.moveFileToFolder(presenterName+viewType+"Module",presenterName.lower()+"_module")
    utility.moveFolderToFolder(presenterName.lower()+"_module","../di/modules")
Exemplo n.º 6
0
def generateView(presenterName,packageName,viewType):
    if viewType == "Fragment":
        utility.createFile(presenterName+"Fragment")
        utility.writeFile(presenterName+"Fragment",helper.generateFragmentViewCode(packageName,presenterName,viewType))
        utility.moveFileToFolder(presenterName+"Fragment",presenterName.lower())
    if viewType == "Activity":   
        utility.createFile(presenterName+"Activity")
        utility.writeFile(presenterName+"Activity",helper.generateActivityViewCode(packageName,presenterName,viewType))
        utility.moveFileToFolder(presenterName+"Activity",presenterName.lower())
def generateModuleLayer(packageName, featureName, repositoryName,
                        repositoryImpName):
    utility.createFolder(featureName.lower() + "_module")
    utility.createFile(featureName + "Module")
    utility.writeFile(
        featureName + "Module",
        helper.generateModuleCode(packageName, featureName, repositoryName,
                                  repositoryImpName))
    utility.moveFileToFolder(featureName + "Module",
                             featureName.lower() + "_module")
    utility.moveFolderToFolder(featureName.lower() + "_module",
                               "../di/modules")
Exemplo n.º 8
0
def generateView(viewmodelName, packageName, viewType):
    if viewType == "Fragment":
        utility.createFile(viewmodelName + "Fragment")
        utility.writeFile(
            viewmodelName + "Fragment",
            helper.generateViewActivityCode(packageName, viewmodelName,
                                            viewType))
        utility.moveFileToFolder(viewmodelName + "Fragment",
                                 viewmodelName.lower())
    if viewType == "Activity":
        utility.createFile(viewmodelName + "Activity")
        utility.writeFile(
            viewmodelName + "Activity",
            helper.generateViewActivityCode(packageName, viewmodelName,
                                            viewType))
        utility.moveFileToFolder(viewmodelName + "Activity",
                                 viewmodelName.lower())
Exemplo n.º 9
0
def generateViewModelPart(viewmodelName, packageName):
    utility.createFile(viewmodelName + "ViewModel")
    utility.writeFile(viewmodelName + "ViewModel",
                      helper.generateViewModelCode(packageName, viewmodelName))
    utility.moveFileToFolder(viewmodelName + "ViewModel",
                             viewmodelName.lower())
def generateDomainMapper(featureName):
    utility.createFolder("mapper")
    utility.createFile(featureName + "Mapper")
    utility.moveFileToFolder(featureName + "Mapper", "mapper")
Exemplo n.º 11
0
def generatePresenterPart(presenterName,packageName):
    utility.createFile(presenterName+"Presenter")
    utility.writeFile(presenterName+"Presenter",helper.generatePresenterCode(packageName,presenterName))
    utility.moveFileToFolder(presenterName+"Presenter",presenterName.lower())
Exemplo n.º 12
0
def genereateContractPart(presenterName,packageName):
    utility.createFile(presenterName+"Contract")
    utility.writeFile(presenterName+"Contract",helper.generateContractCode(packageName,presenterName))
    utility.moveFileToFolder(presenterName+"Contract",presenterName.lower())