Yes you can probably define them as constants.
The detail is complicated and perhaps is overdue for an overhaul. There are multiple stores within alfresco, for example there is also a "system" store. However all the data you care about is probably in the workspace/SpacesStore. Some of the interfaces like CMIS are hard-coded to only access that store so it's a known small issue that needs looking at some point.