Interface IBuiltResourceStorage
- All Superinterfaces:
Collection<BuiltResource>,Iterable<BuiltResource>
- All Known Implementing Classes:
BuiltResourceStorage
Persistence storage for paths of resources processed by
TranslationBuilder.
It separates access to resources with ActionType.CLEANED
type from resource with other action types. That's because the
storage can be unordered or be processed in parallel way, but a resource with clean action
should be processed first because all resources after clean action will be removed anyway.
-
Method Summary
Modifier and TypeMethodDescriptionvoidactivate()Initializes the storage.voidcommit()Saves all changes in persistence storage.voidReleases and closes all resources using by this storage.booleanvoidRemoves any clean action.voidsetCleanAction(BuiltResource resource) Sets built resource to perform a clean action.voidSets default built resource to perform a clean action.
-
Method Details
-
activate
void activate()Initializes the storage. Note this method should be called before using any other methods with the exception ofdeactivate().- See Also:
-
deactivate
void deactivate()Releases and closes all resources using by this storage.- See Also:
-
isActivated
boolean isActivated()- Returns:
- true if this project is activated
- See Also:
-
commit
void commit()Saves all changes in persistence storage. -
getCleanAction
Optional<BuiltResource> getCleanAction()- Returns:
IBuiltResourceto perform a clean action.
-
setCleanAction
Sets built resource to perform a clean action.- Parameters:
resource-
-
removeCleanAction
void removeCleanAction()Removes any clean action. -
setDefaultCleanAction
void setDefaultCleanAction()Sets default built resource to perform a clean action.
-