In Australia, by law, the retailer AND importer are the warranty agents for your bike. It's your responsibility to get the bike to where you bought it from and then it's their responsibility to warrant the entire bike as supplied to you. So if you bought a bike from Joe Blow's Discount Bikes, then Joe Blow is the agent. He in turn will work with his supplier of the bike who provides the warranty. Depending on how old the bike is and how you have treated it you are entitled to either a warranty repair, replacement or refund. This choice is yours, not the agents within a "reasonable amount of time" (that's the text in the statute). So in Oz you don't deal with Shimano. You deal with your retailer. THEY deal with Shimano.
If you bought your bike from overseas then you'll need either an international warranty (through the local importer or return to seller) or you might be on your own. If you do have an international warranty on a part then you wouldn't get free labour from your LBS to assist you but they might act as your agent with Shimano as they will be getting paid for the service they provide.
Regarding the change of components, you're not quite there. To deny a warranty claim the retailer/importer would have to PROVE that the modification caused the fault. So changing forks could NOT void a motor warranty. It may not even void the frame warranty. Say for example there was an incomplete weld on the rear triangle and it failed. Changing the fork has no bearing on this and you have a warranty. If the fork didn't change the geometry, you have warranty. If the change put unreasonable stress on the head tube and it failed, you don't. Changing a stem would not void the warranty on the handlebar unless it was incorrectly fitted. And if it was fitted by your bike shop it'd be under the warranty they MUST provide on their workmanship.
Australian consumer law is very robust. Occasionally, retailers or importers push their luck. You have a strong consumer affairs department who are diligent in supporting you if you think a seller is acting improperly. It's worth being aware of your rights as sometimes sellers try to tell you otherwise.
Consumers
Gordon