is there any way to define my own variable? similar to %BASE_URL% and %BASE_DIR%
currently I implement IBasePathBuilder to set the BASE_URL and BASE_DIR to the users specific folder.. but I also wanted to add a new type for shared images/files.. so I was hoping to be able to define my own variable SHARED_URL and SHARED_DIR.. so I could do
and in case someone is going to suggest just hard coding the path to the SHARED_URL and SHARED_DIR.. I will explain my directory structure
./company/user1/images
./company/user2/images
./company/shared/images
currently the IBasePathBuilder implementation sets the BASE_DIR to ./company/user1/
what would be really nice is to be able to define %company% and %user%.. then I could simply do
and then I could do away with the IBasePathBuilder implementation
currently I implement IBasePathBuilder to set the BASE_URL and BASE_DIR to the users specific folder.. but I also wanted to add a new type for shared images/files.. so I was hoping to be able to define my own variable SHARED_URL and SHARED_DIR.. so I could do
<type name="Images"> <url>%BASE_URL%images/</url> <directory>%BASE_DIR%images</directory> <maxSize>0</maxSize> <allowedExtensions>bmp,gif,jpeg,jpg,png</allowedExtensions> <deniedExtensions></deniedExtensions> </type> <type name="Shared Images"> <url>%SHARED_URL%images/</url> <directory>%SHARED_DIR%images</directory> <maxSize>0</maxSize> <allowedExtensions>bmp,gif,jpeg,jpg,png</allowedExtensions> <deniedExtensions></deniedExtensions> </type>
and in case someone is going to suggest just hard coding the path to the SHARED_URL and SHARED_DIR.. I will explain my directory structure
./company/user1/images
./company/user2/images
./company/shared/images
currently the IBasePathBuilder implementation sets the BASE_DIR to ./company/user1/
what would be really nice is to be able to define %company% and %user%.. then I could simply do
<type name="Images"> <url>%BASE_URL%%company%/%user%/images/</url> <directory>%BASE_DIR%%company%/%user%/images/</directory> <maxSize>0</maxSize> <allowedExtensions>bmp,gif,jpeg,jpg,png</allowedExtensions> <deniedExtensions></deniedExtensions> </type> <type name="Shared Images"> <url>%BASE_URL%%company%/shared/images/</url> <directory>%BASE_DIR%%company%/shared/images/</directory> <maxSize>0</maxSize> <allowedExtensions>bmp,gif,jpeg,jpg,png</allowedExtensions> <deniedExtensions></deniedExtensions> </type>
and then I could do away with the IBasePathBuilder implementation
Re: custom variable (java)
IMO, this is pretty bad solution, but it seems to work
if anyone can think of a better way to accomplish please let me know!!